开发者

VS2005 binary performs better than VS2008 binary

开发者 https://www.devze.com 2023-03-04 17:48 出处:网络
A VS solution consisting of C# and C++ projects 开发者_运维百科built with VS2005 outperforms the same solution converted to VS2008 (release mode). I already double checked the optimization settings fo

A VS solution consisting of C# and C++ projects 开发者_运维百科built with VS2005 outperforms the same solution converted to VS2008 (release mode). I already double checked the optimization settings for the known bug where the settings are not converted correctly. While the difference in performance is not big it is still notable. Any ideas what the reason could be for the difference in performance? Thanks in advance for any replies!


Can’t answer completely without knowing what the code is and what switches are being sent to the compiler.

C# performance shouldn't have changed just by recompiling with a different version of VS. If you have both on the same machine, they'll use the same version of the .NET Framework to execute.

As far as C++ goes, the compiler changes between VS versions so perf won’t always be the same. It’s very possible they made a change to the optimizer that happens to perform worse on your code but better for most others. They could also have adjusted their compiler's instruction scheduler to account for a more modern "average" CPU. VS2008 also brought in a lot of C++ compliance fixes – there might be one that reduced the room the compiler has to optimize.

0

精彩评论

暂无评论...
验证码 换一张
取 消