NGEN x86 vs x64 with .NET executables

情到浓时终转凉″ 提交于 2020-01-04 19:04:47

问题


I have the following question:

My .NET assemblies are compiled in x86 mode. Can I still leverage the performance benefits of NGEN on x64 Windows systems? Will x86 assemblies be compiled into native code on x64?


回答1:


Assemblies compiled with x86 will run i wow64 on 64-bits systems, but assemblies copiled with AnyCPU will run natively, regardless of NGEN. Assemblies compiled for x86 can load 32-bit assemblies on 64-bit systems and code compiled for AnyCPU will not load 32-bit dlls.

When you use NGEN you will avoid JIT-compiling of the assembly and the assembly will be native x86 code when compiled with x86 also on x64 systems.



来源:https://stackoverflow.com/questions/8639159/ngen-x86-vs-x64-with-net-executables

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!