Introduction : When a dotnet program is compiled the output of compiler is non-executable file,that contains special type of code called "MSIL"(MICROSOFT INTERMEDIATE LANGUAGE) Code.this MSIl code code defines set of portable instructions that are independent of CPU.The main task of JIT compiler is to convert this MSIL code into an executable one.
Working Of JIT Compiler :
Microsoft Intermediate Language(MSIL) code is converted into Executable code with the help of JIT compiler.When the program is executed the the Common Language Runtime(CLR) activates the JIT compiler and inturn it will convert the MSIL code to Native(Executable)code.One should remeber that the JIt will not convert complete available MSIL code to native code ,it does it only as it get the instructions from the CLR on demand basis as each part of program is needed.
Types Of JIT Compiler :
(1) PRE JIT Compiler. (2) ECONO JIT Compiler. (3) NORMAL JIT compiler.
(1) PRE JIT Compiler : Pre-JIt compiler compiles complete source(MSIL)code to Native code in a single Compilation.
(1) ECONO JIT Compiler :
This compiler compiles only MSIL code of those methods that are called at Runtime.
3) NORMAL JIT compiler:
This compiler compiles only MSIL code of those methods that are called at Runtime and that converted (native) code is stored in Cache.This happens beccause,when these methods called again it will retrieve code from cache itself without sending request to CLR.Thus,inturn saves much of Executiom time
I hope u've got Idea about the workin of JIt compiler ,its types and their working.
Regards, Kranthi.V.
|
No responses found. Be the first to respond and make money from revenue sharing program.
|