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