Until the code is executed
Just-in-time compiler (JIT)
Code-> Intermediate code (byte code, etc.)-> Execute while compiling
- merit
--Can be executed independently of the environment
--Intermediate code to machine language conversion is much more efficient and faster than source code conversion
--Can be optimized using run-time statistics
- Demerit
--It is an overhead because it compiles at runtime.
wiki
Ahead-of-time compiler (AOV)
Code → Machine language → Execution
- merit
--Can perform time-consuming optimizations
- Demerit
--Execution environment is limited
wiki
Interpreter
Interpret and execute code → line by line
- merit
--Memory saving because it is executed in small units
--Fast startup
- Demerit
--Slow on average
wiki
Adaptive compilation
At the beginning, it is executed as an interpreter, and frequently called methods and repeatedly executed code are compiled and executed.
Good points of JIT and interpreter.
wiki
I want to read it together
Java Performance