GCC
Name | Optimization level | Execution time | Code size | Memory usage | Compile time |
---|---|---|---|---|---|
-O0 | compilation time (default) | + | + | - | - |
-O1 or -O | code size and execution time | - | - | + | + |
-O2 | code size and execution time | – | + | ++ | |
-O3 | code size and execution time | — | + | +++ | |
-Os | optimization for code size | – | ++ | ||
-Ofast | O3 with fast none accurate math calculations | — | + | +++ |