Operator Overloading in C#
JIT stands for just-in-time compiler. It converts the MSIL code to CPU native code as it is needed during code execution. It is called just-in-time since it converts the MSIL code to CPU native code when it is required within code execution otherwise it will do nothing with that MSIL code.
Different Types of JIT
1. Normal JIT
This complies only those methods that are called at runtime. These methods are compiled only first time when they are called, and then they are stored in memory cache. This memory cache is commonly called as JITTED. When the same methods are called again, the complied code from cache is used for execution.
Microsoft Intermediate Language (MSIL/IL/CIL) |
Normal JIT Compiler
|
Native Code
|
Execution
|
Memory Cache
|
2. Econo JIT
This complies only those methods that are called at runtime and removes them from memory after execution. The idea of Econo JIT is to spend less time compiling so that startup latency is lower for interactive applications. This is actually what you want once you notice the application takes seconds to start up.
Microsoft Intermediate Language (MSIL/IL/CIL) |
Econo JIT Compiler
|
Native Code
|
Execution
|
![]() |
||
![]() |
3. Pre JIT
This complies entire MSIL code into native code in a single compilation cycle. This is done at the time of deployment of the application. It is done through NGen (the process of precompiling from CIL to a native image). It will convert the compiled .NET code from the platform-independent intermediate state to a platform specific stage. This means that, it converts the .NET application that can run on both Windows, Mac and Linux 32-bit and 64-bit to an traditional EXE file that can only run on one of these.
Microsoft Intermediate Language (MSIL/IL/CIL) |
Pre JIT Compiler
|
Execution
|
