Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MethodImplOptions.AggressiveInlining vs TargetedPatchingOptOut

What is the difference between the MethodImplAttribute with the option MethodImplOptions.AggressiveInlining and the TargetedPatchingOptOut?

When I searched on Google everybody seems to says that both (might) inline the method but without giving the difference.

like image 312
Yann Lebel Avatar asked Mar 10 '13 04:03

Yann Lebel


1 Answers

I was waiting to see if someone else could have a better answer but it seems no.

After I read dtb comment I did a little bit more research and found this http://blogs.microsoft.co.il/blogs/sasha/archive/2012/01/20/aggressive-inlining-in-the-clr-4-5-jit.aspx.

My understanding of this post is that you can apply both attribute AggressiveInlining will remove the in-lining size limit of the method while like dtb said the TargetedPatchingOptOut will allow inlining accross assembly boundaries.

like image 126
Yann Lebel Avatar answered Nov 15 '22 13:11

Yann Lebel