Resulting EXE speed for C++ under VS2005, VS2008;

2019-06-27 23:14发布

问题:

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.

回答1:

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



回答2:

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:

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.