我希望尽可能快地执行我的 VC++ 代码。有人知道我应该在项目属性和设置中更改或设置什么吗?
问问题
530 次
2 回答
4
There is no silver bullet. Are you sure you are using data structures and algorithms that are best for your problem? If so, you may want to turn on the compiler optimizations on. Go to Configuration Properties > C/C++ > Optimization
and select Maximize Speed
/ Full Optimization
. However, I strongly suggest you play around with all the options in Release mode before settling on any one.
于 2010-03-12T16:33:04.723 回答
1
当你认为你的结构和算法足够好时,它们很可能还有很大的改进空间。为了优化它,在 Debug 构建中,以这种方式优化。这是这个过程的一个例子。
然后切换到发布模式,它应该会生成适当的编译器优化。
于 2010-03-12T17:05:55.897 回答