What is JIT?
Experience Level:
Senior
Tags:
.NET
ASP.NET MVC
ASP.NET WebAPI
ASP.NET WebForms
C#
Answer
Quick introduction
Before a computer can execute the application, special program that is called compiler must translate its source code into machine instructions.
The compilation can be done either Ahead-Of-Time (AOT) or Just-In-Time (JIT).
So JIT = Just-In-Time
By default .NET uses JIT compiler. It is a part of CLR (Common Language Runtime). The CLR manages the execution of .NET applications.
Compiler types
- AOT - Ahead-Of-Time (Explicit) - compiles the code prior to program executio
- JIT - Just-In-Time (Implicit) - compiles the code on-demand
Good to know
- Output of JIT is not persisted so your managed application has to go through JIT for every launch.
- Pre-compilation (using NGEN) can be used to reduce startup overheads related with JIT compilation
Related C# job interview questions
-
What do you know about delegates?
.NET C# Mid-level -
What is MSIL?
.NET ASP.NET MVC ASP.NET WebAPI ASP.NET WebForms C# Senior -
Could you describe how is memory management done in .NET?
.NET ASP.NET MVC ASP.NET WebAPI ASP.NET WebForms C# Senior -
Write a code that takes an integer number and outputs its digits to the console.
.NET C# Code challenge Mid-level -
What is variable capturing good for and how does it work?
.NET C# Senior