Author: director of www.oschina.net/news/114247.

OpenJDK 14 compared to OpenJDK 8 and several major releases of performance benchmarks.

OpenJDK 14 has been released recently, and many developers are concerned about whether there are performance improvements in OpenJDK 14 and what improvements there are. This article looks at running the new benchmark to look at all major releases of OpenJDK 8 through 14, simultaneously looking at JVM performance across multiple workloads, and how OpenJDK 14 compares to previous releases of the JVM.

This test looked at the performance of the JVM by using Java programs compiled using the same Java bytecode on each distribution under test, using reference/upstream compiled versions of the packages under test. To ensure that test interference is kept to a minimum, the same options are used every time, and no changes are made other than swapping OpenJDK X86_64 Linux builds for testing each distribution.

Using Phoronix’s test suite, tests range from SPECjbb to Java 2D workloads.

Test environment and test machine configuration:

By first pressing the Performance of the Java graphics pipeline using Java 2D benchmarks, you can see that text rendering performance steadily improves until it peaks in release 12 and then gradually declines to current levels 13 and 14, similar to OpenJDK 8.

When it comes to Java 2D image rendering performance, they are about the same, but OpenJDK 14 is the best with a slight performance advantage.

Rendering with vector graphics is also tested here, and the level remains pretty consistent.

Using a very basic Java SciMark microbenchmark, you can see that OpenJDK 8 is by far the fastest and that performance has been essentially flat since OpenJDK 9 through 14. OpenJDK runs at about 88% of OpenJDK 8’s speed.

Using the Java Bork file encryption package for testing, performance was essentially unchanged in the versions tested.

Since OpenJDK 8, DaCapo’s H2 benchmark has been modeled as an in-memory benchmark similar to JDBCbench, and its performance has improved well, with OpenJDK 14 again narrowly winning the first place compared to previous versions.

As you can see, the Jython benchmark based on Python Pybench is also one of the many cases where OpenJDK 8 has the best results. Recommended reading: Java 8 Stream: Awesome Performance?

In the Tradebeans test that ran the Daytrader benchmark, OpenJDK 14 again came out on top by a narrow margin.

Like playing ping-pong, Renaissance’s Scala Dotty benchmark provides a similar example of how OpenJDK performance can fluctuate. In this test, OpenJDK 14 was again better than the most recent version.

In some of the other Renaissance benchmarks, OpenJDK 11 to 12 had the worst performance, while OpenJDK 14 provided similar performance to OpenJDK 8.

In the Renaissance benchmark using Jenetics+Futures genetic algorithm, the performance of all versions was basically consistent. Java 14 has five exciting new features to look forward to. Follow wechat public account: Java Technology stack, in the background reply: Java, you can get the latest N Java new feature tutorials, are dry goods.

By looking at these benchmarks using Apache HBase, OpenJDK 8 runs the fastest, or the performance of the Java versions is about even.

In benchmarking with SPECjbb, OpenJDK 8 is by far the fastest and most significantly distanced release. SPECjbb performance has improved since version 11, though none of the versions are as fast as OpenJDK 8 on AMD Ryzen 9 3950X running Ubuntu Linux.

Conclusion:

When taking the geometric average of all the Java benchmark results performed, OpenJDK 8 is without a doubt the fastest Java release. The industry often hears stories about how OpenJDK 8 still delivers the best performance, and why Intel’s Clear Linux is sticking with it even when there are so many options. Based on the test results in this article, this is not surprising.

The good news is that, in this geometric sense, OpenJDK 14 is the second fastest release ever tested. The lead is small compared to previous versions, but overall it is still improving.

Follow wechat public account: Java Technology stack, in the background reply: Java, you can get the latest N Java new feature tutorials, are dry goods.

Read more on my blog:

1.Java JVM, Collections, Multithreading, new features series tutorials

2.Spring MVC, Spring Boot, Spring Cloud series tutorials

3.Maven, Git, Eclipse, Intellij IDEA series tools tutorial

4.Java, backend, architecture, Alibaba and other big factory latest interview questions

Life is good. See you tomorrow