Compiler Flags and Optimization
| Lesson overview |
Lesson overview
Topics covered: -O0 -O1 -O2 -O3 -Os -Og, profile guided optimization, strict aliasing.
Compiler Flags and Optimization
-O0 - no optimization, debugging friendly
-O1 - some optimization, faster than -O0
-O2 - aggressive optimization (default)
-O3 - maximum optimization
-Os - optimize for size
-Og - optimize for debugging
-ffast-math - faster math (may break standards compliance)
Article author: Arthur Isaev