C++ 的最终 EXE 速度VS2005、VS2008下; VS2010编译器
当我从 VS6 升级到 VS2005 时,我发现使用默认编译设置的国际象棋引擎程序的速度提高了 10%。
想知道一般情况下是否也是如此,以及从那时起对 MS C++ 编译器的最终输出进行了哪些改进(如果有的话)。
When I upgraded from VS6 to VS2005, I saw a 10% boost in the speed of my chess engine program with the default compile settings.
Wondering if the same is true in general, and what improvements, if any, have been made to the final output of the MS C++ compiler since then.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
关于从 2010 年之前的 VC++ 版本迁移到 VC++ 2010+:
如果您大量使用 STL 容器和算法,升级到 VC++ 2010+ 可能会提供显着超过 10% 的改进,如下所示VC++ 2010+ 实现了 C++11 的移动语义。
我记得 Boost 邮件列表上的一篇具体帖子声称,从 VC++ 2008 迁移后,他们的应用程序性能提高了 900%到 VC++ 2010 的结果是:
[boost] [GGL] [geometry] 使用 Visual C++ 2010 时难以理解的速度优势
Regarding moving to VC++ 2010+ from versions of VC++ prior to 2010:
If you make heavy use of the STL containers and algorithms, upgrading to VC++ 2010+ may provide substantially more than just a 10% improvement, as VC++ 2010+ implement C++11's move semantics.
I recall a specific post on the Boost mailing list that claimed their application's performance increased by 900% when moving from VC++ 2008 to VC++ 2010 as a result of this:
[boost] [GGL] [geometry] Inexplicable speed benefit when using Visual C++ 2010
我很确定每个版本都至少添加了一点新的/更好的优化。对于我测试过的大多数代码,连续版本之间的改进约为 3-4%,因此您可能会看到另外 10% 的改进,但我有点期望少一点。
I'm pretty sure every version has added at least a little bit in the way of new/better optimization. For most code I've tested, the improvement is around 3-4% between consecutive versions, so you might see another 10% improvement, but I'd sort of expect a little less.
VS2012 中引入的有限自动矢量化(VS2010 中需要 simd 内在函数)可能有助于解释 Boost 报价。在我的测试中,VS2013 与 VS2012 相比,损失多于收益。 VS2013和2015似乎更注重新语法的引入而不是性能。
The limited auto-vectorization introduced in VS2012 (simd intrinsics required in VS2010) might help account for the Boost quotation. VS2013 showed more losses than gains vs. VS2012 in my tests. VS2013 and 2015 seem more oriented to introduction of new syntax rather than performance.