Log in

No account? Create an account

Previous Entry | Next Entry

In Microsoft .NET there are 3 types of JIT compilers:-

  • 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.

Normal-jit is the default implementation and it produces optimized code. Econo-jit just replaces IL instruction with native counterpart. It does not do any kind of optimization. Econo-jit does not store the compiled code in cache so it requires less memory.

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.

In order to install full compiled native code in cache we can execute the below command line from your visual studio command prompt.


Also see below video on weak name references: -

Copy right www.questpond.com


Latest Month

September 2017
Powered by LiveJournal.com