Can I avoid JIT in .NET?

前端 未结 3 2046
余生分开走
余生分开走 2021-01-06 01:56

Say if my code is always going to be run on a particular processor and if I have this information during installation - is there a chance I can avoid JIT?

3条回答
  •  攒了一身酷
    2021-01-06 02:33

    Use NGEN:

    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 using the just-in-time (JIT) compiler to compile the original assembly...

    For additional information on using Ngen.exe and the native image service, see Native Image Service...

提交回复
热议问题