0
根据gcc的在线文档,它gcc优化:-O0做什么?
Reduce compilation time and make debugging produce the expected results.
This is the default.
因此,它是一样的,在所有的或不离开了-O标志?
根据gcc的在线文档,它gcc优化:-O0做什么?
Reduce compilation time and make debugging produce the expected results.
This is the default.
因此,它是一样的,在所有的或不离开了-O标志?
据GCC documentation,是的,-O0
是默认的。所以这与完全抛弃国旗一样。
-O0
是默认的。还有一点需要注意的是,如果你想对速度进行最佳优化,从我读的内容来看,-O2
实际上是最好的选择。我以为-O3
是,但它可能会导致问题,只是你知道。此外,不要打开优化调试版本,因为它可以打破它们。
此外,您可以快速撤消任何其他-O标志,可能是命令行(从配置还是从你的IDE一些设置)上。最后一个是重要的。 – Damon