Debug模式下加快运行速度的一些方法

1.用范围for循环代替常规的迭代循环。

常见For循环优化方式总结(外大内小有不同意见)

2.将迭代器的调试功能关闭

项目-〉属性-〉配置属性-〉C/C++ -〉预处理器-〉预处理定义 -〉添加“_ITERATOR_DEBUG_LEVEL=0”即可。

Why is this code 100 times slower in debug?

3.禁用调试堆

Visual Studio application running extremely slow with debug

项目->属性->配置属性->调试->环境->_NO_DEBUG_HEAP=1

The Windows Heap Is Slow when launched from the debugger

4.调试建议

Make Debugging Faster with Visual Studio

 

 

 

 

 

原文地址:https://www.cnblogs.com/algs/p/15080565.html