A race of two compilers: GraalVM JIT versus HotSpot JIT C2
summary
Benchmarks compare GraalVM JIT against HotSpot C2 on OpenJDK (Java 12/13) using JMH, JITWatch and perf and show concrete differences: Graal reduces allocations via partial escape (scalar) replacement and wins on aggressive inlining and polymorphic-call handling, while C2 emits AVX2 vectorized loops, loop unrolling and YMM register code that make array multiply tests about 4.2× slower on Graal and unpredictable-branch tests ~6–7× slower; Graal needs much longer warmup (50–100s) and some array-escape thresholds differ (C2 ignores arrays >64 bytes).
AI-written summary · about
