.Net Native和NGen [英] .Net Native and NGen

查看:95
本文介绍了.Net Native和NGen的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 您好,

  .Net Native和NGen之间的主要区别是什么?

 What are the main differences between .Net Native and NGen?

 例如,为什么我们不能简单地运行NGen然后删除MSIL?

 For example, why we cannot simply run NGen and then remove MSIL?

  Aleksey

 Aleksey

推荐答案

想到.NET Native的一种方法是NGEN技术的演变。 .NET Native与NGEN有几种不同的方式 - 例如,如果没有合适的NGEN映像可用于需要调用的特定
方法,NGEN将保留回退到JITing代码的能力。 这使得NGEN无法简单地丢弃MSIL,因为它确实需要不时地退回MSIL。   NGEN还承担了大量的运行时间来提供服务的实现,例如远程处理
和互操作。   .NET Native使用更小的运行时,将这些服务转移到构建时间步骤。   NGEN图像也往往很脆弱 - 例如,如果你修补mscorlib.dll,你最终需要重新验证机器上所有
其他程序集。   .NET Native的当前设计允许应用程序彼此独立地进行服务。

One way to think of .NET Native is as an evolution of the NGEN technology. There are several ways that .NET Native differs from NGEN - for instance NGEN retains the ability to fall back to JITing code if there is no suitable NGEN image available for a particular method that needs to be invoked.  This precludes NGEN from being able to simply throw away the MSIL since it does need to fall back to it from time to time.   NGEN also assumes a hefty runtime to provide implementations of services such as remoting and interop.   .NET Native uses a much smaller runtime, moving these services into build time steps.   NGEN images also tend to be fragile - if you patch mscorlib.dll for instance, you'll wind up needing to re-NGEN all of the other assemblies on the machine.   The current design of .NET Native allows for applications to be serviced independently of one another.


这篇关于.Net Native和NGen的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆