Re: Java 7 vs 8 speed issues on Win7?
On 11/6/2014 5:03 PM, Jan Burse wrote:
Jan Burse schrieb:
Thought experiment: If the next JVM patch improves the JIT so
sparse `switch' blocks on `char' values are compiled more efficiently,
is that a change in the "semantics" of `switch'?
Yes its a bigger potato than before. The potato
has changed. For example the compiler will accept
certain programs which he didn't accept before.
[...]
Oops, correction. I was reading "char" as string.
No compiler optimizations are usually semantics
preserving. Are not really considered as semantic
changes of a language construct.
Thanks for the correction; you had me even more confused
than is my default state.
However, the correction leaves me wondering just what *does*
constitute a "semantic" change, in your estimation. On the one
hand you maintain that a change in the `private' behavior of
String is a "semantic" change, although its only externally-
visible effect is on performance, not on function. On the other,
you hold that a hypothetical change to `switch' would *not* be a
"semantic" change, since it only affects performance but does not
change the outcome. I cannot see what distinguishes the two cases,
why one function-preserving-but-performance-altering change is
"semantic" and the other is not.
Perhaps, as you suggest, it's just "potato" versus "spud."
--
esosman@comcast-dot-net.invalid
"Don't be afraid of work. Make work afraid of you." -- TLM