
10
|
Chapter 1: Introduction
This is the Title of the Book, eMatter Edition
Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.
Intermediate Language (IL)
IL, also known as MSIL (for Microsoft Intermediate Language), is a processor-
independent representation of executable code. IL is similar in some ways to
assembly code, but it is not specific to a particular CPU; rather, it is specific to the
CLR. IL is generated by each of the language compilers that target the CLR. As
mentioned above, .NET assemblies contain IL that is to be executed by the CLR.
At runtime, the CLR just-in-time (JIT) compiles the IL to native code, which is then
executed. There is also a tool called ngen.exe, which is supplied with the .NET
Framework SDK and allows you to precompile assemblies to native code at install
time and cache the precompiled code to disk. However, while precompiling an
assembly to native code will improve the startup time of an assembly, the JIT process
used by the CLR performs optimizations that may allow JITed code to perform
better than precompiled code, the difference in performance will depend on the code
being executed, and how subject to these optimizations it is.
Managed Execution
Managed execution refers to code whose execution is managed by the CLR. This
execution includes memory management, access security, cross-language integra-
tion for debugging and/or exception handling,