Java vs CPU — round 2
summary
Compares Java performance at the CPU level using perf counters and shows that relying on JIT alone is misleading: a simple loop achieves ~0.87 IPC but becomes ~2.59 IPC with predictable branches and falls to ~0.5 IPC with random branches, where ~12% branch-mispredicts cause several-times slowdown. Demonstrates that converting branches to branchless conditional moves can cut branch counts from ~1B to ~100k and deliver ~3x speedup; also shows NUMA page migration and TLB shutdown cause global pauses, and that cache-tiling (blocking) cuts load misses by ~70% and restores throughput.
AI-written summary · about
chapters (8)
- 0:00Java vs CPU
- 1:57CPU performance
- 6:08Branch impact
- 13:50Branchless programming
- 21:11NUMA challenges
- 36:22Memory access
- 44:29CPU tools
- 47:21Q&A
related talks
46mJava vs CPU
51mJava at Speed: Getting the Most Out of Modern Hardware
40mLudicrous Speed: Designing For Performance on the JVM
54mJava performance techniques The cost of HotSpot runtime optimizations
59mAn Introduction to JVM Performance
35mJava at Speed: Building a Better JVM
01h 01mAn Introduction to JVM Performance
47mMicrobenchmarks performance in the smaller scale
