This article should take about 1.2 minutes to read.


Author: h4cd

Source: Open Source Chinese community

The open source planning and scheduling engine OptaPlanner has published a Java 11 GC performance benchmark report on its website.



Currently, the most used version of Java is 8, so the testers compared Java 8 to Java 11.

GC is a key factor affecting Java performance, so the test was also based on GC, and was carried out under G1 GC and parallel GC respectively, with the following results:

Java 8 vs. Java 11

Using the G1 GC



G1 GC points per second:



Java 11 has speed improvements on almost all test data sets.

On average, there was a 16% improvement just by switching to Java 11, an improvement likely due to the introduction of JEP 307: Parallel Full GC for G1 in Java 10.

Using parallel GC



Points per second under parallel GC:



With parallel GC, the results are not as good as G1, with some data sets improving, but others staying the same or even experiencing performance degradation. On average, Java 11 improved performance by more than 4%.

The testers also compared the parallel GC with G1 GC on Java 11:

Parallel GC vs. G1 GC on Java 11



The results show that G1 GC is inferior to parallel GC overall.

OptaPlanner reported an average speed improvement of 16.1% for G1 GC and 4.5% for parallel GC from Java 8 to Java 11.

In addition, while parallel GC is throughput oriented and G1 focuses on low-latency GC, the significant improvements in G1 introduced in Java 11 make a direct comparison of the two meaningful.

In addition, based on most of the datasets in the benchmark, the parallel GC is a better fit for OptaPlanner because throughput is more important to solving OptaPlanner optimization problems.


Detailed test benchmarks and procedures

https://www.optaplanner.org/blog/2019/01/17/HowMuchFasterIsJava11.html



Highlights from the past

570,000 writes per second, how to achieve?

40 pictures for single Programmers to smile about on Valentine’s Day!

IDEA 32 shortcuts to be sure to understand

The dirtiest technology in the world, and I got it.

Bing hang! Baidu wins again

Meet tea lady, how should elegant reply to her

I was programmer pit 6 million send company close down, party one by one refute: I don’t carry this pot

MySQL > select * from ‘MySQL’;

Seven tips help you write elegant Java code

Welcome to pay attention to my public number “programmer’s growth road”, read more wonderful!