What is CLR (Common Language Runtime)

Common Language Runtime (CLR) is the runtime environment that manages the interpretation, compilation and execution of .NET program code. It also provides services such as memory management, exception management, debugging and security.

It constitutes the core component of the Microsoft’s .NET framework platform. Once a specific .NET compiler converts the source .NET code into CIL (Common Intermediate Language) (previously known as MSIL - Microsoft Intermediate Language), then the CLR compile the CIL into native machine code.

This illustrates basically the flow of a .NET program compilation and execution.

image_thumb21

Once the .NET assembly is compiled into Native Code, it is stored on an assembly cache for a specific period of time and then executed. This way, no further recompilation is necessary and speeds up significantly consequent executions. This process is what is called JIT (Just In Time) compilation.

Among many advantages of a JIT compilation platform, for me, the most important is to be hardware and platform agnostic for coders. This means that a specific .NET software will always run in the most efficient way (“supposedly”) regardless the hardware or the operating system version it running on.

Although .NET CLR only runs on Windows, I’ve heard that there are 3rd parties .NET compiler for other Operating Systems.

Leave a comment
Display Name:  


Email:    


Comment:  



Domain Registrations starting at $9.69
Powered by Carlos Bercero Blog Platform © 2009