TargetedPatchingOptOut: “Performance critical to inline across NGen image boundaries”?

It tells NGen that it is OK to inline the method it’s applied to even in a different assembly. For example: String.Equals has [TargetedPatchingOptOut] You write a program that calls String.Equals You run NGen on this program for maximum performance NGen will inline the String.Equals call, replacing the method call instruction with the actual code … Read more

Does it help to use NGEN?

NGen will only help startup time – it doesn’t make the code execute any faster than it would after JITting. Indeed, I believe there are some optimizations which NGen doesn’t do but the JIT does. So, the main question is: do you have an issue with startup time? I don’t know how much of an … Read more