What is Just-In-Time(JIT) Compiler in .NET Last Updated : 03 Feb, 2021 Comments Improve Suggest changes Like Article Like Report Just-In-Time compiler(JIT) is a part of Common Language Runtime (CLR) in .NET which is responsible for managing the execution of .NET programs regardless of any .NET programming language. A language-specific compiler converts the source code to the intermediate language. This intermediate language is then converted into the machine code by the Just-In-Time (JIT) compiler. This machine code is specific to the computer environment that the JIT compiler runs on. Working of JIT Compiler: The JIT compiler is required to speed up the code execution and provide support for multiple platforms. Its working is given as follows: The JIT compiler converts the Microsoft Intermediate Language(MSIL) or Common Intermediate Language(CIL) into the machine code. This is done before the MSIL or CIL can be executed. The MSIL is converted into machine code on a requirement basis i.e. the JIT compiler compiles the MSIL or CIL as required rather than the whole of it. The compiled MSIL or CIL is stored so that it is available for subsequent calls if required. Types of Just-In-Time Compiler: There are 3 types of JIT compilers which are as follows: Pre-JIT Compiler: All the source code is compiled into the machine code at the same time in a single compilation cycle using the Pre-JIT Compiler. This compilation process is performed at application deployment time. And this compiler is always implemented in the Ngen.exe (Native Image Generator). Normal JIT Compiler: The source code methods that are required at run-time are compiled into machine code the first time they are called by the Normal JIT Compiler. After that, they are stored in the cache and used whenever they are called again. Econo JIT Compiler: The source code methods that are required at run-time are compiled into machine code by the Econo JIT Compiler. After these methods are not required anymore, they are removed. This JIT compiler is obsolete starting from dotnet 2.0 Advantages of JIT Compiler: The JIT compiler requires less memory usage as only the methods that are required at run-time are compiled into machine code by the JIT Compiler.Page faults are reduced by using the JIT compiler as the methods required together are most probably in the same memory page.Code optimization based on statistical analysis can be performed by the JIT compiler while the code is running. Disadvantages of JIT compiler: The JIT compiler requires more startup time while the application is executed initially.The cache memory is heavily used by the JIT compiler to store the source code methods that are required at run-time. Note: Much of the disadvantages of the JIT compiler can be handled using the Ahead-of-time (AOT) compilation. This involves compiling the MSIL into machine code so that runtime compilation is not required and the machine code file can be executed natively. Comment More infoAdvertise with us Next Article What is Just-In-Time(JIT) Compiler in .NET H harkiran78 Follow Improve Article Tags : Python Practice Tags : python Similar Reads Architecture of Common Language Runtime (CLR) The Common Language Runtime in the .NET Framework is the Virtual Machine component that handles program execution for various languages such as C#, F#, Visual Basic .NET, etc. The managed execution environment is provided by giving various services such as memory management, security handling, excep 3 min read C# Interactive Interpreter This article is designed to showcase the step by step implementation of Interactive C# Interpreter Development by virtue of .NET framework codeDOM APIâs which enables us to dynamically evaluate C# code expressions and statements for testing mini code fragments or scripts more or less like to Python 11 min read Garbage Collection in C# | .NET Framework Garbage collection is a memory management technique used in the .NET Framework and many other programming languages. In C#, the garbage collector is responsible for managing memory and automatically freeing up memory that the application is no longer using.The garbage collector periodically scans th 8 min read C# Interview Questions and Answers C# is the most popular general-purpose programming language and was developed by Microsoft in 2000, renowned for its robustness, flexibility, and extensive application range. It is simple and has an object-oriented programming concept that can be used for creating different types of applications.Her 15+ min read .NET Framework Class Library (FCL) The Framework Class Library or FCL provides the system functionality in the .NET Framework as it has various classes, data types, interfaces, etc. to perform multiple functions and build different types of applications such as desktop applications, web applications, mobile applications, etc. The Fra 3 min read Like