大型项目的Visual Studio 2010 C ++链接器性能 [英] Visual Studio 2010 C++ linker performance for large projects

查看:90
本文介绍了大型项目的Visual Studio 2010 C ++链接器性能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的公司中,我们仍在使用Visual Studio 2005,但在偷看Visual Studio 2010,希望它能加快开发周期的某些部分.目前,我们对Visual Studio 2010的C ++链接器的性能最感兴趣.在构建应用程序时,我们会在40秒到2分钟之间查看链接时间,具体取决于计算机配置(SSD与HDD)以及是否东西已经在Windows的磁盘缓存中了.一个简单的测试(使用VS2010链接器而不是VS2005链接器)显示了大约25%的改进.我们希望看到更大的改进,因为我们认为该链接器现在可以利用多个内核.

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 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.

这真的是我们切换到VS2010时应该期待的25%的改进,还是有一些魔术链接器开关将链接时间减少到可接受的水平?

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?

推荐答案

我的理解是,MS在VS2010中对链接器进行的重大更改(性能方面)是,在单独的线程上完成了.pdb文件的编写.当然,由于链接器的作用远不止于此,因此它会改善总体链接时间是有限制的:

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:

这是一篇文章,展示了如果您对该分析感兴趣的话,如何获得一些更详细的时序统计信息:

And here's an article that shows how you can get some more detailed timing statistics if you're interested in that analysis:

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆