JIT Compilers in .NET Environment

JIT (Just in time) compiler is a part of the .NET runtime execution environment. Unlike traditional compilers JIT doesn’t compile the full class file in one shot. Compilation is done on function basis or file basis.

JIT compilation has advantage over traditional compilation that heavy parsing of original source code is avoided. Compilation in .NET is done on the basis and it’s in steps most of the time.  

In .NET environment there are three types of JIT compilers:  

Pre-JIT : Per-JIT compiler just compiles source code into native code in a single compilation cycle.

Pre-JIT sits at the stage of deployment of the application.  

Econo- JIT: Econo-JIT compiles methods that are called at runtime.

However, these compiled methods are discarded when they’re not required.  

JIT (Normal JIT) – They’re called “JIT” or “Normal JIT”.

Normal JIT only compiles the methods which are called at runtime. These methods are compiled the first time they’re called and then they’re stored in cache. When the same methods are called again, the compilation code from cache is used for execution.