The CLR’s Execution Model(Chapter 1 of CLR via C#)
2011-04-18 22:00
441 查看
The NGen.exe tool that ships with the .NET Framework can be used to compile IL code to native code when an application is installed on a user’s machine. Since the code is compiled at install time, the CLR’s JIT compiler does not have to compile the IL code at runtime, and this can improve the application’s performance. The NGen.exe tool is interesting in two scenarios: Improving an application’s startup time Running NGen.exe can improve startup time because the code will already be compiled into native code so that compilation doesn’t have to occur at runtime. Reducing an application’s working set If you believe that an assembly will be loaded into multiple processes simultaneously, running NGen.exe on that assembly can reduce the applications’ working set. The reason is because the NGen.exe tool compiles the IL to native code and saves the output in a separate file. This file can be memory-mapped into multiple-process address spaces simultaneously, allowing the code to be shared; not every process needs its own copy of the code.
相关文章推荐
- CLR Via C# 3rd 阅读摘要 -- Chapter 1 - The CLR's Execution Model
- [CLR via C#]1#The CLR's Execution Model WORK-IN-PROGRESS
- Type Fundamentals(Chapter 4 of CLR via C#)
- Primitive, Reference, and Value Types(Chapter 5 of CLR via C#)
- read the "clr via C# " of 类型基础(第四章)
- Type and Member Basics(Chapter 6 of CLR via C#)
- Read the "clr via C#" of 基元类型,引用类型,值类型(第五章)
- Constants and Fields(Chapter 7 of CLR via C#)
- Shared Assemblies and Strongly Named Assemblies(Chapter 3 of CLR via C#)
- Building, Packaging, Deploying, and Administering Applications and Types(Chapter 2 of CLR via C#)
- CLR Via C# 3rd 阅读摘要 -- Chapter 10 - Properties
- CLR Via C# 3rd 阅读摘要 -- Chapter 7 - Constants and Fileds
- CLR Via C# 3rd 阅读摘要 -- Chapter 19 – Nullable Value Types
- The CLR’s Execution Model
- CLR Via C# 3rd 阅读摘要 -- Chapter 28 – Primitive Thread Synchronization Constructs
- CLR Via C# 3rd 阅读摘要 -- Chapter 24 – Runtime Serialization
- CLR Via C# 3rd 阅读摘要 -- Chapter 11 - Events
- CLR Via C# 3rd 阅读摘要 -- Chapter 14 - Chars, Strings, and Working with Text
- CLR Via C# 3rd 阅读摘要 -- Chapter 2 - Building, Packaging, Deploying, and Administering Applications and Types
- 《CLR via C#》Part1之Chapter3 共享程序集和强命名程序集(二)