I'm assuming there is vast performance difference between Java 1.4 and Java 6 after skimming this document.
My question, will Java 6 runtime still got its magic when the bytecode it has to run was compiled in 1.4?
Some background for "why the question?" is here.
Yes, because most of the optimizations are done at runtime by the JVM, compiler is doing very little with regards to optimization. Thus code compiled with old Java compiler will still benefit from new JVM.
However there are some optimizations performed at compile time, like replacing consecutive String
concatenations with StringBuilder
.