Skip to content
Veltoryx Technologies
ProLesson 10.6Advanced4 min readUpdated 30 October 2026

The JIT compiler

How the JVM turns hot bytecode into fast native code while your program runs, tiered compilation, key optimisations, and why Java warms up.

Java starts by interpreting bytecode, which is slow. While the program runs, the Just-In-Time (JIT) compiler watches which code runs most and compiles it to optimised machine code. That's why a Java service is often slower in its first minute and then very fast: it's warming up.

01Interpreter vs JIT

  • The interpreter executes bytecode one instruction at a time. It starts immediately, but each instruction costs extra work.
  • The JIT compiles a whole method (or a hot loop) to native code once, then runs that native code directly.
  • The JIT only compiles hot code. Compiling everything would waste time on code that runs once.

Loading the rest of the lesson…