How many types of Jit Compilers?Just-In-Time compiler- It converts the MSIL code to CPU native code as it is needed during code execution.
Different Types of JIT
- Pre JIT Compiler
- Econo JIT Compiler
- Normal JIT Compiler
Pre JIT CompilerPRE JIT Compiler compiles complete source code into native code in a single compilation cycle. 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. The advantage of PRE JIT Compiler is that you don't have the initial compilation delay that the compiler can introduce when an assembly or type is loaded for the first time in code. It improves the warm startup time of your program. A warm start is one where the assembly data is already in the file system cache so no time is spent by the disk drive to locate the DLL on the disk. As opposed to a cold start, one you'll get when the assembly has never been loaded before or was loaded long ago, the disk drive has to find the file first. Which is slow. You almost always only care about cold start time because that's the one that's so noticeable to the user.
Econo JIT CompilerEcono JIT Compiler compiles only those methods that are called at runtime . However, these compiled methods are removed when they are not required. 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 app takes seconds to start up.
Normal JIT CompilerNormal-JIT compiles only those methods that are called at runtime . After execution this method is stored in the memory and it is commonly referred as "jitted" . No further compilation is required for the same method. Subsequent method calls are accessible directly from the memory cache.
- C# Interview Questions (part-1)
- C# Interview Questions (part-2)
- C# Interview Questions (part-3)
- Difference between a Debug and Release build
- Difference between normal DLL and .Net DLL
- What is an Interface in C#
- Difference between Abstract Class and Interface
- Difference between a thread and a process
- Delegates in C# with Examples
- Differences between a control and a component
- Differences between Stack and Heap
- What is .Net Reflection
- Globalization and Localization
- What is .Net serialization
- Difference between web service and .net remoting
- Difference between managed and unmanaged code
- Difference between Shallow copy and Deep copy
- Use of System.Environment Class
- What is the difference between private and shared assembly?
- Does the .NET have in-built support for serialization?
- How to properly stop the Thread in C#?
- Why are there five tracing levels in System.Diagnostics.TraceSwitcher?
- Why is XmlSerializer so slow?