JIT Compiler & Code Manager


JIT compiler
  • Just-in-time compiler [JIT] is a part of common language run-time [CRL].
  • JIT compiler converts the MSIL or CIL code into native / machine code.
  • The JIT compiler is required to speed up the code execution and provide support for multiple platform.
  • There are three types of JIT compiler :-

Pre JIT Compiler :-

  •  In Pre-JIT compilation, complete source code is converted into native code in a single cycle.
  • This is done at the time of application deployment.
  • It is always implemented in the Ngen.exe.

Normal JIT Compiler :-

  •  In this, the compiler compiles only those methods that are called at runtime.
  • After executing this method, compiled methods are stored in the code and used whenever they are called again.

Econo JIT Compiler :-

  • The compiler compiles only those methods that are called at run-time.
  • After execution of this method, compiled methods are removed from the memory.

Code Manager

.Net supports two types of coding:

  1. Managed code.
  2. Unmanaged code.

Managed code :- 

  • The MSIL code which is managed by the CLR is known as Managed code.
  • Managed code is written in high-level language runs on top of .Net such as C#, J#, VB .net, etc.

Unmanaged code :- 

  • Unmanaged code are not managed by CLR. They are managed by operating system.
  • Unmanaged code means compile directly to the machine code.
Example :- C++, Win32.