bytecode interpreter
The part of the JVM that executes bytecode one instruction at a time, which needs no preparation but runs slower than compiled code.
In more detail
Every method starts out interpreted, so a program can begin immediately. While interpreting, the JVM gathers statistics about which methods are hot, and hands those to the JIT compiler. Cold code that runs rarely may stay interpreted for the whole life of the program.
Related terms
- JIT compiler — A compiler inside a runtime that turns intermediate code into native machine code while the program runs.
- bytecode — A compact, portable instruction format that a virtual machine or interpreter executes, instead of instructions for one particular processor.
- JVM — The program that loads class files and runs their bytecode, turning hot code into native machine instructions while it runs.
Taught in
- The Lifecycle Of A Java Program — Modern Java: Virtual Threads & High-Throughput Services