mediumConceptMidSeniorStaff
Walk me through what happens between the source you write and the instructions the CPU runs, and where does a JIT fit into that?
5 min readUpdated 2026-08-15
Answer
Short answer
Source is tokenised, parsed, checked, lowered to an intermediate representation, optimised and emitted - either ahead of time to machine code or to bytecode executed by a runtime.
Was this answer helpful?
Likely follow-ups
- Why can a JIT inline a virtual call that a static compiler must leave indirect?
- What does the JVM's bytecode verifier check, and why before execution rather than during?
- Why does an ahead-of-time native image start faster but sometimes plateau lower?
- How would you benchmark a method on a JIT-compiled runtime without measuring the interpreter?
Related questions
- Walk me through the phases of the Node event loop.mediumAlso on performance4 min
- A method has been running fast for an hour and then gets slower, with no code change and no extra traffic. What might the runtime be doing?hardAlso on jit5 min
- This table has fourteen indexes and writes have got slower. How do you work out which ones to drop?hardAlso on performance6 min
- Walk me through how you read a PostgreSQL execution plan.mediumAlso on performance5 min