NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

JIT Compilation Options

The runtime supplies two kinds of Just In Time (JIT) compilers, each of which is designed for specific situations, as the following table indicates:

JIT compiler Description
JIT The regular JIT compiler. Converts one method at a time to native code, as described above. Used when small, fast, platform-specific code is required and the time required for optimization is not an issue.
Fast-JIT A very fast JIT compiler. Converts IL to platform-specific native code very quickly, performing no optimizations. Supports a mechanism called code pitching, which frees memory by throwing away native code for methods that haven't recently been executed. Used when there are constraints on CPU time available for JIT compiling and when the native code doesn't have to be efficient.

The runtime supplies a third mode of compilation called "pre-JIT", which occurs at installation time instead of at execution time. Pre-JIT performs the task of converting IL to native code just as the regular JIT compiler does, but it converts larger units of code at a time, storing the resulting native code for use when the assembly is subsequently loaded and executed. When using the pre-JIT option, the entire assembly that is being installed is converted into native code, taking into account what is known about other assemblies that are already installed. The resulting pre-JITted file loads and starts more quickly than it would have if it were being converted to native code "just-in-time" for execution.