Visual Studio 2008 C ++代码比Visual Studio 2005慢 [英] Visual Studio 2008 C++ code slower than Visual Studio 2005
本文介绍了Visual Studio 2008 C ++代码比Visual Studio 2005慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在重新编译了一些性能关键代码之后,我注意到用Visual Studio 2008 Pro在发布模式下创建的二进制文件比使用Visual Studio 2005编译的完全相同的代码慢大约5-15%.运行一个大循环并传递字符串的项目,我可以看到性能差异.
After recompiling some of our performance critical code I've noticed that the binaries created in Release mode with Visual Studio 2008 Pro are about 5-15% slower than the exact same code compiled with Visual Studio 2005. Just creating a very simple project running a large loop passing strings I can see performance differences.
还有其他人看到吗?
谢谢
戴夫.
推荐答案
我在Visual Studio 2008中遇到相同的问题.我创建了一个棋盘游戏程序.在发布模式下使用Visual Studio 2005进行编译,我获得了出色的搜索性能;在Core 2 Duo上每秒大约有400万个节点.在发布模式下用Visual Studio 2008重新编译完全相同的源代码,我得到的性能非常差;每秒少于100万个节点,或者性能下降超过75%.这是不可接受的.
I am experiencing the same issue with Visual Studio 2008. I created a board game program. Compiling with visual studio 2005 in release mode, I get great search performance; on the order of 4 million nodes per second on a Core 2 Duo. Re-compiling the exact same source code with Visual Studio 2008 in release mode I get very dismal performance; well less than 1 million nodes per sec, or a performance drop exceeding 75%. This is unacceptable.
这篇关于Visual Studio 2008 C ++代码比Visual Studio 2005慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文