Given an empty method body, will the JIT optimize out the call (I know the C# compiler won\'t). How would I go about finding out? What tools should I be using and where shou
This chap has quite a good treatment of JIT optimisations, do a search on the page for 'method is empty', it's about half way down the article -
http://www.codeproject.com/KB/dotnet/JITOptimizations.aspx
Apparently empty methods do get optimised out through inlining what is effectively no code.
@Chris: I do realise the that the methods will still be part of the binary and that these are JIT optimisations :-). On a semi-related note, Scott Hanselman had quite an interesting article on inlining in Release build call stacks:
http://www.hanselman.com/blog/ReleaseISNOTDebug64bitOptimizationsAndCMethodInliningInReleaseBuildCallStacks.aspx