[英]Mixing debug and release in MSVC?
I got a program that has a quite simple 'load up' function that takes about 30 seconds (3M triangles that goes into std containers). 我有一个程序,该程序具有非常简单的“加载”功能,该功能大约需要30秒(将3M三角形插入std容器)。 It works perfectly well. 效果很好。
The rest doesn't always (it is not finished) so I debug a lot I make a lot of changes and so on which means restarting quite often. 其余的并不总是(未完成),因此我进行了很多调试,进行了很多更改,依此类推,这意味着非常频繁地重新启动。
Is there any secret technique to compile the loader in release (which speeds up everything enormously) and leaving the rest as debug? 是否有任何秘密技术可以在发行版中编译加载程序(这极大地加快了一切速度),而将其余部分留作调试?
ps. PS。 I use MSVC 2005 我使用MSVC 2005
Debug builds tend to be very slow on Visual C++. 在Visual C ++上,调试版本往往很慢。 There are a few reasons for this: 这有几个原因:
I've had success debugging apps that make heavy use of memory and STL using the following method: 我已经成功调试了使用以下方法大量使用内存和STL的应用程序:
Note that the above works great to debug problems in your own logic, but it may not be the best idea if you are debugging memory corruption or other problems, since you are eliminating all the extra debug code that the CRT provides for these types of issues. 请注意,上面的方法对于调试您自己的逻辑中的问题非常有用,但是如果您要调试内存损坏或其他问题,则并不是最好的主意,因为您将消除CRT为这些类型的问题提供的所有其他调试代码。 。
I hope this helps! 我希望这有帮助!
Mixing debug and release builds tends to go horribly wrong. 混合使用调试版本和发行版本往往会出错。
But there's no reason why you shouldn't turn on optimisation for some selected source files even in a debug build - and the optimisation should give you the performance improvements. 但是,没有理由为什么即使在调试版本中也不应为某些选定的源文件打开优化功能-并且该优化功能可以提高性能。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.