At my company we're still using Visual Studio 2005, but are peeking at Visual Studio 2010 in the hope that it will speed up some parts of our development cycle. At the 开发者_Python百科moment we're most interested in the performance of the C++ linker of Visual Studio 2010. When building our application, we're looking at link times between 40 seconds and 2 minutes, depending on machine configuration (SSD vs HDD) and if stuff is already in Windows' disk cache. A simple test where we use the VS2010 linker instead of the VS2005 linker showed an improvement of about 25%. We were hoping to see a much much bigger improvement because we thought that the linker would now be able to make use of multiple cores.
Is this 25% really the improvement that we should expect when switching to VS2010, or are there some magic linker switches that reduce link times to acceptable levels?
My understanding is that the big change (performance wise) that MS made to the linker in VS2010 is that writing the .pdb file is done on a separate thread. Of course, since the linker does much more than this, there's a limit to how much it'll improve the overall link time:
- Linker throughput
And here's an article that shows how you can get some more detailed timing statistics if you're interested in that analysis:
- VC++ Tip: Get detailed build throughput diagnostics using MSBuild, compiler and linker
Anyway, a 25% improvement in speed by just dropping in a new set of tools seems to be a pretty good result to me.
25% less time is not bad. If you want faster linking times try dynamic linking with DLLs as opposed to linking with static libraries. This is often way faster.
精彩评论