Skip to content
Commitwise
Menu

JIT compiler

Also called: Just-in-time compilation, HotSpot

The part of the JVM that compiles frequently run bytecode to optimized machine code while the program runs.

Definition

The JVM starts by interpreting bytecode and profiles which methods are hot. Those are compiled, first quickly (C1) and then with aggressive optimizations based on observed behavior (C2): inlining, removing unused code and checks that never fail. This is why Java services get faster during their first minutes, and why naive benchmarks mislead.

In practice

The first 500 requests after a deploy take 80 ms on average, later ones 15 ms, once the hot paths are compiled.

Related terms

Esc

Type to search the whole site.