Visual Studio 2005 C++ 编译器比 Visual Studio 6 编译器慢吗?
我们的一个旧的 C++ 项目仍然使用 Visual Studio 6。每年我都会尝试将其转换为更高的 Visual Studio 版本,但这并不容易,因为并非所有代码都是我们编写的。 不管怎样,我在修复了几百行代码后终于成功地将项目转换为VS2005。 但编译项目需要很长时间! 比 VS6 长得多。
有些类有很多代码行,甚至几千个。 这些只是要在代码中填充很多项目的数组。 我知道这不是完美的解决方案,但这就是目前的情况,VS6 从来没有遇到过问题。
也许我需要调整一些设置来加快速度,但如果它保持现在的样子,我会将其保留为 VS6 项目,因为我不想整天坐在办公桌前无所事事。
有任何想法吗?
One of our old C++ projects is still with Visual Studio 6. Once a year I try to convert it in to a higher Visual Studio Version but it's not easy because not all the code is written by us.
Anyway, I finally succeeded in converting the project to VS2005 after fixing a few hundred lines of code. But compiling the projects takes a very long time! Much longer than in VS6.
Some classes have a lot of codelines, a few thousands even. These are just arrays to be filled in the code with a lot of items. I know it's not the perfect solution but this is how it is at the moment and VS6 never had a problem with that.
Maybe there are just some settings I have to adjust to speed things up but if it stays like it is now I will keep it as an VS6 project since I don't want to sit at my desk all day doing nothing.
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
获取 Incredibuild。
绝对物有所值。
它的作用是将文件的编译委托给网络上空闲的构建“代理”,获取结果并将其链接到构建协调器。 机器越多越好。 构建时间的缩短给我留下了深刻的印象。
Get Incredibuild.
Definitely worth the money you pay for it.
What it does is delegate compilation of files to idle build "agents" on the network, get the results back and link it on the build co-ordinator. The more machines the better. I was impressed with the reduction of build time.
编译时间的差异是正常的。 VS2005 的 C++ 编译器比 VC6 更符合标准 C++。 这两个编译器之间存在巨大差异。
Differences in compile times are normal. The C++ compiler from VS2005 is significantly more compliant to standard C++ than VC6 was. There is a huge difference between these two compilers.
VS2005 生成更优化的代码,因此必须花费额外的时间来弄清楚如何使其更快。
VS2005 produces more optimized code and thus has to spend extra time figuring out how to make it faster.
看看你是否能找到在 VS05 中编译速度很快但速度很慢的最小模块,看看它们有什么共同点。 将慢速模块中的元素添加到快速模块中,直到速度突然减慢。 这就是问题的原因。
See if you can find the smallest modules that compile quickly, and very slowly in VS05, and see what they don't have in common. Add in the elements from the slow module to the fast one until you get a sudden slowdown. That is the cause of the problem.
听起来您的“一年一次升级”已经落后了几年,不是吗?
检查以确保您没有关闭预编译标头。
Sounds like you are a few years behind in your "once-a-year-upgrade", no?
Check to make sure you didn't turn off pre-compiled headers.