Execution Engine in JVM
The bytecode assigned to run-time data areas will be executed by the execution engine. The execution engine reads the bytecode and executes it piece by piece.
Interpreter
The interpreter interprets the bytecode quickly, but it is slow. The disadvantage of the interpreter is that when the same method is called multiple times, a new interpretation is required each time.
JIT Compiler
The JIT compiler eliminates the shortcomings of the interpreter. The engine will use the interpreter's help when converting the bytecode, but when it finds duplicate code, it uses a JIT compiler, which compiles all the bytecode and changes it to native code. This native code will be used directly for repeated method calls that improve system performance.
- Intermediate Code Generator. Produces intermediate code.
- Code Optimizer. Responsible for optimizing the intermediate code generated above.
- Target Code Generator. Responsible for generating machine code or native code.
- Profiler. A special component responsible for finding hotspots, that is, whether the method is called multiple times or not.
Garbage collector
Read also:
Comments
Post a Comment