- Normal-JIT (Default): - Normal-JIT compiles only those methods that are called at runtime. These methods are compiled the first time they are called, and then they are stored in cache. When the same methods are called again, the compiled code from cache is used for execution.
- Econo-JIT: - Econo-JIT compiles only those methods that are called at runtime. However, these compiled methods are not stored in cache so that RAM memory can be utilized in an optimal manner.
- Pre-JIT: - Pre-JIT compiles complete source code into native code in a single compilation cycle. This is done at the time of deployment of the application. We can implement Pre-jit by using ngen.exe.
The choice of Normal-JIT and Econo-JIT is decided internally. Econo-JIT is chosen when devices have limitation memory and CPU cycle issues like windows CE powered device. When there is no memory crunch and CPU power is higher than Normal-JIT is used.
Pre-JIT is implemented by using ngen.exe.
Ngen storesfull compiled.NET native code in to cache. In other words rather than dynamically compiling the code on run time a full image of native compiled code is stored in cache while installing the application. This leads to better performance as the assembly loads and execute faster.
Also see below video on weak name references: -