-
Notifications
You must be signed in to change notification settings - Fork 3
Compiler Options
Plorence edited this page Mar 11, 2020
·
1 revision
Options | Optimization Level | Execution Time | Code Size | Memory Usage | Compile Time |
---|---|---|---|---|---|
-O0 | optimization for compilation time (default) | + | + | - | - |
-O1(O) | optimization for code size and execution time | - | - | + | + |
-O2 | optimization more for code size and execution time | -- | + | ++ | |
-O3 | optimization more for code size and execution time | --- | + | +++ | |
-Os | optimization for code size | -- | ++ | ||
-Ofast | O3 with fast none accurate math calculations | --- | + | +++ |
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Origin here, GCC online docs here