Friday 6 July 2012

What is the JIT? What is NGEN? What are limitations and benefits of each?

Purpose:
  • Tests whether a developer has an understanding of what happens under the hood of .Net Runtime.
  • Having knowledge of NGEN shows that a developer would have been involved with code optimization exercises in the past that is a promising sign for experience and skill.

Potential Answer:
Just-In-Time compilation produces MSIL (Microsoft Intermediate Language) the first time the assembly is called, it is compiled into CPU specific native code by the .NET JIT compiler.  to have a so called portable executable which in theory one can write once and run everywhere. JIT compiles the code and stores result native code in memory at initial call and subsequent calls is accessing in-memory native code hence it is relatively efficient.

NGEN is when code is pre-compiled or pre-JITted into native code which makes for faster startup times.

No comments:

Post a Comment