Ionut Balosin

Ionut Balosin

Ionut Balosin is an Independent Technical Trainer an a Software Architect currently employed by Raiffeisen Bank International AG. He is also a regular speaker at software development conferences and meetups around the world, delivering presentations, training courses and workshops. For more details please check his website.

A race of two compilers: GraalVM JIT versus HotSpot JIT C2. Which one offers better runtime performance?

Friday, September 27 – Day 2 - 13:00 - Room 2

Do you want to check the efficiency of the new, state of the art, GraalVM JIT Compiler in comparison to the old but mostly used JIT C2? Let’s have a side by side comparison from a performance standpoint on the same source code.

The talk reveals how traditional Just In Time Compiler (e.g. JIT C2) from HotSpot/OpenJDK internally manages runtime optimizations for hot methods in comparison to the new, state of the art, GraalVM JIT Compiler on the same source code, emphasizing all of the internals and strategies used by each Compiler to achieve better performance in most common situations (or code patterns). For each optimization, there is Java source code and corresponding generated assembly code in order to prove what really happens under the hood. Each test is covered by a dedicated benchmark (JMH), timings and conclusions.

Main topics of the agenda:
– Scalar replacement
– Null Checks
– Virtual calls
– Lock coarsening
– Lock elision
– Virtual calls
– Scalar replacement
– Lambdas
– Vectorization (few cases)

The tools used during my research study are: JITWatch, Java MeasurementHarness, and perf. All test scenarios will be launched against latest official Java release (e.g. version 11).