简体   繁体   English

VS2005,VS2008下的C ++ EXE速度; VS2010编译器

[英]Resulting EXE speed for C++ under VS2005, VS2008; VS2010 compilers

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. 当我从VS6升级到VS2005时,我看到我的国际象棋引擎程序的速度提升了10%,并带有默认的编译设置。

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. 想知道一般情况是否一样,以及从那时起对MS C ++编译器的最终输出做了哪些改进(如果有的话)。

Regarding moving to VC++ 2010+ from versions of VC++ prior to 2010: 关于从2010年之前的VC ++版本迁移到VC ++ 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. 如果您大量使用STL容器和算法,升级到VC ++ 2010+可能会提供大大超过10%的改进,因为VC ++ 2010 +实现了C ++ 11的移动语义。

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邮件列表中的一篇特定帖子声称,当他们从VC ++ 2008迁移到VC ++ 2010时,他们的应用程序性能提高了900%:
[boost] [GGL] [geometry] Inexplicable speed benefit when using Visual C++ 2010 [boost] [GGL] [geometry]使用Visual C ++ 2010时速度无法解释

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. 对于我测试过的大多数代码,连续版本之间的改进大约为3-4%,所以你可能会看到另外10%的改进,但我有点期望一些。

The limited auto-vectorization introduced in VS2012 (simd intrinsics required in VS2010) might help account for the Boost quotation. VS2012中引入的有限自动矢量化(VS2010中所需的simd内在函数)可能有助于解释Boost报价。 VS2013 showed more losses than gains vs. VS2012 in my tests. 在我的测试中,VS2013对VS2012的损失大于收益。 VS2013 and 2015 seem more oriented to introduction of new syntax rather than performance. VS2013和2015似乎更倾向于引入新语法而不是性能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM