O'Reilly logo

Writing High-Performance .NET Code, 2nd Edition by Ben Watson, Leticia Watson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

JIT Compilation

.NET code is distributed as assemblies of Microsoft Intermediate Language (MSIL, or just IL for short). This language is somewhat assembly-like, but simpler. If you wish to learn more about IL or other CLR standards, do an Internet search for “ECMA C# CLI standards.”

When your managed program executes, it loads the CLR which will start executing some wrapper code. This is all machine code. The first time a managed method is called from your assembly, it actually runs a stub that executes the Just-in-Time (JIT) compiler which will convert the IL for that method to the hardware’s machine instructions. This process is called just-in-time compilation (“JITting”). The stub is replaced and the next time that method is called, the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required