Monday, 5 December 2016

Working of JIT (Just In Time) compiler.

 Working of JIT (Just In Time) compiler.

  • JIT instance for just in time compiler which is responsible to convert the byte code into the executable code in the following manner.
  • When a method calling is encountered first time, the JIT converts there instructions and provided then to the operating system for the execution and at that same time also stored the converted instruction in the temporary cache.
  • When the method calling this encountered again then the JIT fix up the converted instructions from the temporary cache and provided to the operating system.
JIT working

1.      Java command issued to run the Test class and immediately JVM gets loaded into the RAM.
2.      Test class loaded into JVM that means byte code of the total class loaded.
3.      JIT started to convert the instruction of main method.
4.1      M1 ( ) method calling encountered.
4.2  Instruction of M1 ( ) method converted by the JIT and stored into the cache.
4.3  Instruction provide to the operating system for the execution.
5.1  Calling of M1 ( ) method again.
      5.2 JIT pickup the instruction from the cache and provide to the operating system.

No comments:

Post a Comment