How many types of JIT Compilations do you know?

Technology CommunityCategory: .NET CoreHow many types of JIT Compilations do you know?
VietMX Staff asked 3 years ago

There are three types of JIT compilation in the .NET framework: 1. Pre-JIT complies complete source code into native code in a single compilation cycle. In .NET languages, this is implemented in Ngen.exe (Native Image Generator). All CIL instructions are compiled to native code before startup. This way the runtime can use native images from the cache instead of invoking the JIT Compiler. 2. Econo-JIT complies only those methods that are called at runtime. However, these complied methods are removed when they are not required. 3. Normal-JIT complies only those methods that are called at runtime. These methods are complied the first time they are called, and then they are stored in cache. When the same methods are called again, the complied code from cache is used for execution.