Recent Questions
.Net Framework : What is difference between string and stringbuilder?

What is difference between string and stringbuilder?

String is for simple string operations while StringBuilder is used to perform high manipulation stri....
Category: .Net Framework Date: 7/3/2010 1:55:44 PM
C# : Can we have a variables inside the interface?

Can we have a variables inside the interface?

No, we can have only methods, properties, indexers and enums inside the interface.
Category: C# Date: 7/3/2010 1:54:37 PM
C# : What is static class and what is use of this?

What is static class and what is use of this?

Static class we define when we do not want to create a object of class, all methods of static class ....
Category: C# Date: 7/3/2010 1:54:06 PM
OOPs Concepts : What is difference between overloading and overriding?

What is difference between overloading and overriding?

Having same name methods with different parameters is called overloading, while having same name and....
Category: OOPs Concepts Date: 7/3/2010 1:53:22 PM
.Net Framework : What is difference between Monitor.Enter and Monitor.TryEnter functions?

What is difference between Monitor.Enter and Monitor.TryEnter functions?

Monitor.Enter waits for the lock until it does not get it, while Monitor.TryEnter will request for l....
Category: .Net Framework Date: 7/3/2010 1:52:22 PM
.Net Framework Interview Questions and Answers
<< Previous Question Next Question >>
Question: 858 Page Views: 

How Just in Time Compiler Works?



Posted By: Avi Date: 30 November 2009 02:53:38 PM
Answer:

.Net Framework uses two step compilation process. We write code in C#, VB.Net, or in other supporting languages and when we compile the code, the respective language's compiler compiles the code into an intermediate code called the MSIL (Microsoft Intermediate Language).

When you execute the program, i.e. the intermediate code, the Just-In-Time (JIT) compiler comes into the picture. The job of the JIT compiler is to convert intermediate code in to the machine code or the native code for execution.

The advantage of converting the source code to the intermediate code is that it can run on any operating system provided you have the JIT for that operating system. This gives the portability to your code.

Another advantage of JIT compiler is that the code can be optimized to a particular operating system.


Posted By: eTechPlanet


Date: 30 November 2009 02:53:38 PM

When you execute the program, i.e. the intermediate code, the Just-In-Time (JIT) compiler comes into the picture. The job of the JIT compiler is to convert intermediate code in to the machine code or the native code for execution. With the JIT the code can be optimized to a particular operating system. This is one of the advantages of going for such code execution.

The advantage of converting the source code to the intermediate code is that it can run on any operating system provided you have the JIT for that operating system. This gives the portability to your code.

In .Net the CLR which also has the JIT is used to convert the CIL code into the native code to be processed by the machine. It is also possible to convert the source code to the native code directly by bypassing the tasks done by the JIT. This helps to reduce the load in the JIT. This is done in some cases.


Posted By: Johndecruse


Date: 31 January 2010 10:53:29 PM
Post a better Answer if you have
 
(Will show your Gravatar icon)  
  Country flag

Loading
rFKyCM