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

寵の児 提交于 2019-12-23 12:43:06

问题


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.



来源:https://stackoverflow.com/questions/5559160/resulting-exe-speed-for-c-under-vs2005-vs2008-vs2010-compilers

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!