An Introduction to JVM Performance
summary
HotSpot runs methods at levels 0–4 using C1/C2 JIT with runtime profiling and speculative inlining, and about 90% of call sites are monomorphic, so inlining and devirtualization drive most speedups. Avoid megamorphic call sites and excess anonymous types; object pooling usually hurts because escape analysis removes short‑lived objects and avoids heap allocation. Measure with harnesses like JMH or Mission Control and inspect intrinsics and machine code (adopt's "watch"); false sharing and cache misses (reading large lines costs millions of instructions) cause far bigger slowdowns than micro-optimizations.
AI-written summary · about
chapters (13)
- 0:00Start
- 2:56How a Java Program Is Run
- 4:50The Jvm Layer and the Processor Layer
- 5:52How Does Hotspot Run Your Code
- 14:35Single Inheritance
- 20:23Mega Morphic Call Sites
- 31:50Inheritance Model
- 39:45Code Elimination
- 45:37Intrinsics
- 47:08Sorting Algorithm
- 50:15False Sharing
- 55:17Heisenberg's Uncertainty Principle
- 56:46Safe Points
related talks
41mAn Introduction to JVM Performance
59mAn Introduction to JVM Performance
49mAn Introduction to JVM Performance
54mJava performance techniques The cost of HotSpot runtime optimizations
35mJava at Speed: Building a Better JVM
01h 09mWhat it means to be Just In Time
01h 09mFrom Bytecode to Native Code in HotSpot JVM
11mJVM internals — bytecode, JIT, GC, speculative optimization
