使用反射器经历了一些框架类,并注意到许多方法和属性具有以下属性
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
Run Code Online (Sandbox Code Playgroud)
我很确定我在其他地方也看到了上述评论,从未跟进过.
有人可以告诉我这在C#和其他任何背景下意味着什么?
我已经介绍过了,现在我正在寻找可以从我的热点中挤出一切可能的性能.
我知道[MethodImplOptions.AggressiveInlining]和ProfileOptimization类.还有其他人吗?
[编辑] 我刚刚发现了[TargetedPatchingOptOut].没关系,显然不需要一个.
MethodImplAttribute与选项MethodImplOptions.AggressiveInlining和TargetedPatchingOptOut?之间有什么区别?
当我在Google上搜索时,每个人似乎都说(可能)内联方法但没有给出差异.