A journey to JVM Excellence: Navigating JDKs and JVMs
summary
Public benchmarks use JMH, JDK 17, x86 and aarch64, HotSpot C2, GraalVM CE and Oracle GraalVM and reveal concrete tradeoffs: Oracle GraalVM CE/Enterprise often wins overall by 10s–40% on many microcases; C2 beats Graal on implicit NullPointer hot loops because C2 avoids filling stack traces (fast-throw), while Graal fills stack traces; enum lookups need cached values to avoid allocation storms; nested synchronized code can be two orders of magnitude slower when C2 fails to compile (runs in interpreter); Graal’s allocation grouping and scalar replacement reduce allocations; results come from compilation logs, assembly inspection, async-profiler flame graphs.
AI-written summary · about
chapters (14)
- 0:00JVM compiler benchmarks intro
- 3:58Focus on JDK 17
- 6:09Benchmarking setup
- 8:18Baseline benchmark
- 11:15Enum lookup performance
- 16:18Nested synchronization
- 22:20Dead local store optimizations
- 27:23Null pointer exceptions
- 32:18Recursive method optimizations
- 34:03Scalar replacement analysis
- 38:17Benchmark results stats
- 41:52Choosing the right compiler
- 43:37Key learnings
- 47:17Q&A








