Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Performance difference between source-code targeted at different Java versions?

Tags:

java

I have a 1.5 compatible Java source which will run solely on 1.8 VM and wondering whether it would be beneficial to target 1.8 during compilation instead of an older version.

Would there be any performance difference between 1.5 vs 1.8? Is there any relevant documentation or change-logs available which I could take a look at??

like image 350
orom Avatar asked Dec 30 '15 09:12

orom


People also ask

How much faster is Java 17?

Java 17 is 8.66% faster than Java 11 and 2.41% faster than Java 16 for G1GC (default). Java 17 is 6.54% faster than Java 11 and 0.37% faster than Java 16 for ParallelGC. The Parallel Garbage Collector is 16.39% faster than the G1 Garbage Collector.

Is Java 1.8 the same as Java 8?

In short – 8 is product version number and 1.8 is the developer version number (or internal version number). The product is the same, JDK 8, anyways.

Which version of Java is best?

Java SE 11 OR 17 remains the preferred production standard in 2022. While both 9 and 10 have been released, neither will be offering LTS. Since it's first release in 1996, Java has maintained a reputation for being one of the most secure, reliable, and platform independent languages for computer programming.

What is the difference between Java 8 and Java 11?

It is an open-source reference implementation of Java SE platform version 11. Java 11 was released after four years of releasing Java 8. Java 11 comes with new features to provide more functionality. Below are the features which are added in the four and a half years in between these two versions.


1 Answers

Since the compiled Java code you are referring to is the Java Byte code, running your old application with a new JVM version (1.8) should improve the performance of your application without the need of a recompilation of the byte code.

You can have a look at the Oracle official documentation regarding JDK 8 performance improvement to understand whats changed.

like image 93
aleroot Avatar answered Oct 12 '22 21:10

aleroot