How and when does ngen.exe work?

后端 未结 4 734
旧时难觅i
旧时难觅i 2020-12-08 16:12

I want to know the benefit of pre-JIT compilation (ngen.exe). What is the role of the Native Image Generator (NGen) process and why is it required?

Please provide an

4条回答
  •  执笔经年
    2020-12-08 16:29

    Per MSDN:

    The Native Image Generator (Ngen.exe) is a tool that improves the performance of managed applications. Ngen.exe creates native images, which are files containing compiled processor-specific machine code, and installs them into the native image cache on the local computer. The runtime can use native images from the cache instead of using the just-in-time (JIT) compiler to compile the original assembly.

    I have used NGEN in the past during installation so that the software would start up faster.

提交回复
热议问题