什么是.NET的优势和jitting预装配缺点是什么? [英] What are the advantages and disadvantages of pre-jitting assemblies in .NET?

查看:345
本文介绍了什么是.NET的优势和jitting预装配缺点是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是.NET的优势和jitting预装配缺点是什么?

What are the advantages and disadvantages of pre-jitting assemblies in .NET?

我听说前jitting将提高性能。当我应该预先JIT,当我不应该预先JIT?

I heard that pre-jitting will improve performance. When should I pre-jit and when shouldn't I pre-jit?

推荐答案

预jitting或预编译会提高性能,是在启动后,因为你会跳过这一步。之所以说.NET JIT们每次一个应用程序及其库负荷,以便它可以无需管理自己的作品在许多平台上,并提供最佳的优化架构上运行。

"Pre-jitting" or pre-compiling will improve performance, at start up, because you would be skipping that step. The reason that .NET JITs every time an app and its libraries load is so that it can run on many platforms and architectures with the best possible optimizations without the need for managing your builds.

所以,你必须权衡是否值得管理员头疼保存几秒钟的应用程序启动和库加载。我认为最常见的用例这样做是为服务器安装在那里你会管理几台机器和环境非常稳定。例如。你不会预编译的客户端应用程序,因为目标环境是可预测的要少得多。

So you have to weigh whether it's worth the admin headaches to save a few seconds on app start up and library loads. I think the most common use case for doing this is for server installs where you tend to manage few machines and the environment is very stable. E.g. you would not pre-compile for client apps because the target environments are much less predictable.

这篇关于什么是.NET的优势和jitting预装配缺点是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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