What is new .Net Native [closed]

橙三吉。 提交于 2019-12-21 03:12:16

问题


Today I have read an article about the new .Net Native on MSDN.

"Windows Store apps start up to 60% faster with .NET Native and have a much smaller memory footprint. Our first release is a Developer Preview that allows you to develop and test apps with this new compiler. This preview release of .NET Native offers you the performance of C++ with the productivity of C#".

Of course, this is really interesting but If .Net Native is a new compiler which gives good performance then why we needs to go for RyuJIT. What is this new .Net Native? What is the difference between new .Net Native and RyuJIT, also Microsoft released compiler as a service called Roslyn. So how Roslyn supports this new .Net Native.


回答1:


.NET Native is not part of the Roslyn project as such. Roslyn is a re-implementation of the C# and VB compilers and language services. Remember these compilers produce managed assemblies. In order to run, they have to be translated to platform specific code. This is typically done through the JIT compiler in the .NET runtime.

.NET Native allows you to turn .NET projects into native binaries similar to what NGEN does, but with a few important differences. .NET Native uses a different native compiler part than NGEN that produces faster and smaller code in general. It also allows a kind of static linking that is not available for regular .NET apps.



来源:https://stackoverflow.com/questions/22867991/what-is-new-net-native

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