.NET Framework JIT compiler

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Introduction

JIT compilation, or just-in-time compilation, is an alternative approach to interpretation of code or ahead-of-time compilation. JIT compilation is used in the .NET framework. The CLR code (C#, F#, Visual Basic, etc.) is first compiled into something called Interpreted Language, or IL. This is lower level code that is closer to machine code, but is not platform specific. Rather, at runtime, this code is compiled into machine code for the relevant system.

Remarks

Why use JIT compilation?

  • Better compatibility: each CLR language needs only one compiler to IL, and this IL can run on any platform on which it can be converted into machine code.
  • Speed: JIT compilation attempts to combine the speed of running ahead-of-time compiled code, and the flexibility of interpretation (can analyze code that will be executed for potential optimizations before compiling)

Wikipedia Page for more information on JIT compilation in general: https://en.wikipedia.org/wiki/Just-in-time_compilation



Got any .NET Framework Question?