The JIT compiler and warm-up
On This Lesson 4 topics
This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.
In this lesson
explain why performance changes after startup.
Planned topics
- The JVM starts by interpreting; it counts method calls and loop iterations.
- Tiered compilation: C1 compiles quickly with light optimization; C2 compiles hot code with heavy optimization.
- C2 uses profile data (inlining, escape analysis) and can deoptimize if its assumptions break.
- Result: first requests are slow, later ones fast. This is warm-up.
- Benchmarking cold code measures startup, not steady state.
Draft outline details
Demonstration
a latency curve: high for the first ~1,000 requests, dropping in steps as tiers kick in.
Check your understanding
Why is the first request slower?
Show answer
Code is interpreted and classes are still loading; hot code is not yet compiled.
Practice
Apply this lesson with the module's lab, exercises and quiz.
Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.