See the Optimization Levels section for more information.
Option |
Description |
Default |
-O, -O1, |
IA-32 compiler: Optimize to favor code size. Disable option -fp. -O1 disables intrinsics inlining to reduce code size. Itanium(TM) compiler: Optimize to favor code size. Enable the same optimizations as -O2 except for loop unrolling. -O1 turns off software pipelining to reduce code size. Generally, -O2 is recommended over -O1. |
OFF |
-O2 |
Optimizes for speed, but disables some optimizations that increase code size for a small speed benefit. Default. |
-O2 |
-O3 |
Enables -O2 option with more aggressive optimization
and sets high-level optimizations, including loop transformation, OpenMP,
and prefetching. High-level optimizations use the properties of source
code constructs such as loops and arrays in applications written in high-level
programming languages. |
OFF |
-O0 |
Disables optimizations -O1, -O2 and -O3. |
OFF |