Che*_*hen 10 .net c# performance extension-methods
我刚看到这篇关于时间测量的帖子.我记得(我希望我没有记错)这是一场不公平的比赛,如果以前从未打过这种方法的话.那是:
// At the beginning of the application
MyClass instance = new MyClass();
instance.MyMethod();
instance.MyMethod(); // Faster than the first call, because now it's warmed up.
Run Code Online (Sandbox Code Playgroud)
我们真的在C#中有这样的热身理论吗?如果是,为什么(热身时CLR会做什么)?如果这个方法是扩展方法(静态方法),那么一切都是一样的吗?