问题描述
我要寻找的属性,我可以用它来确保到装载机,JIT编译器或NGEN给予提示的最佳运行时性能为我的.NET应用程序。
I am looking for attributes I can use to ensure the best runtime performance for my .Net application by giving hints to the loader, JIT compiler or ngen.
例如,我们 DebuggableAttribute 应设置为不能进行调试,而不是禁用优化最佳性能。
For example we have DebuggableAttribute which should be set to not debug and not disable optimization for optimal performance.
[Debuggable(false, false)]
是否有任何其他我应该知道的?
Are there any others I should know about?
推荐答案
ECMA-335规定了宽松的异常处理(所谓的E-轻松调用)附件F林precise故障一些CompilationRelaxations,但它们没有暴露由Microsoft。
Ecma-335 specifies some more CompilationRelaxations for relaxed exception handling (so-called e-relaxed calls) in Annex F "Imprecise faults", but they have not been exposed by Microsoft.
具体CompilationRelaxations.RelaxedArrayExceptions和CompilationRelaxations.RelaxedNullReferenceException提到那里。
Specifically CompilationRelaxations.RelaxedArrayExceptions and CompilationRelaxations.RelaxedNullReferenceException are mentioned there.
这将会是野趣当你只是试图在CompilationRelaxationsAttribute的构造函数一定整数会发生什么;)
It'd be intersting what happens when you just try some integers in the CompilationRelaxationsAttribute's ctor ;)
这篇关于什么属性帮助运行.NET性能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!