Some Information on C# and how the JUST IN TIME compiler works

in #computers8 years ago (edited)

I am an Information Technology student, and as such I have wrote many papers as homework assignment. Some of which have some interesting if not valuable information. All of which have summarized hours worth of reading into a few short paragraphs. I will post a few of those here, and if others show interest in them, I will post more. This first one is a quick rundown of how the JUST IN TIME compiler for C# works.

Common Language Runtime (CLR) converts .NET code into Intermediate Language (IL). IL is the same for all .NET languages, which allows the .NET runtime to use several languages. The Just In Time compiler then converts the IL into machine code, which is then executed. This allows programs to run on many different OS’s, and hardware.
The CLR provides the plumbing of programs, so that developers can concentrate on developing new vibrant programs. CLR provides basics like debugging, exception management, execution management, garbage collection, interop, security, thread management, type loading, and type safety. Also CLR provides the .NET framework class library support, and the Just in Time Compiler.

The Just In Time (JIT) Compiler converts the IL derived from the C# code, (or any .NET code using CLR) to machine code, right before executing the code, and only after the IL has been cached. This insures that only the executed code is compiled into machine code, making the program run more efficiently. This is where JIT gets its name, it compiles the code just in time.

Common Language Runtime, works with the Just in Time Compiler to create a flexible, and efficient platform for programs to develop on. CLR provides the basics features, that in the past would cost developers hours in production time. JIT saves computer resources by only compiling the code that is executed.

References
"Just In Time Compiler - JIT." VB.NET-Informations.com. N.p., 2015. Web. 9 Sept. 2015. http://vb.net-informations.com/framework/just_in_time_compiler.htm.
Microsoft. "Overview of the .NET Framework." Microsoft.com. N.p., 2015. Web. 9 Sept. 2015. https://msdn.microsoft.com/en-us/library/zw4w595w(v=vs.110).aspx.

Coin Marketplace

STEEM 0.25
TRX 0.20
JST 0.036
BTC 96147.07
ETH 3525.13
USDT 1.00
SBD 3.45