javaperformancecomparisonbenchmarkingversions

Are Java 6's performance improvements in the JDK, JVM, or both?


I've been wondering about the performance improvements touted in Java SE 6 - is it in the compiler or the runtime? Put another way, would a Java 5 application compiled by JDK 6 see an improvement run under JSE 5 (indicating improved compiler optimization)? Would a Java 5 application compiled by JDK 5 see an improvement run under JSE 6 (indicating improved runtime optimization)?

I've noticed that compiling under JDK 6 takes almost twice as long as it did under JDK 5 for the exact same codebase; I'm hoping that at least some of that extra time is being spent on compiler optimizations, hopefully leading to more performant JARs and WARs. Sun's JDK info doesn't really go into detail on the performance improvements they've made - I assume it's a little from column A, and a little from column B, but I wonder which is the greater influence. Does anyone know of any benchmarks done on JDK 6 vs. JDK 5?


Solution

  • I have not heard about improvements in the compiler, but extensive information has been published on the runtime performance improvements.

    Migration guide:

    http://java.sun.com/javase/6/webnotes/adoption/adoptionguide.html

    Performance whitepaper:

    https://www.oracle.com/java/technologies/javase/6performance.html