Optimizing for Application Types

For Itanium Architecture Only
Click a compiler option to see more information.

Use these options to optimize for a specific type of application. The following descriptions refer to both IA-32 and Itanium® architectures.

-fast Enhances speed across the entire program:
i64 Linux: Enables -O3 -ipo -static
i64 Windows: Enables -O3 -Qipo
i32, i32em Linux: Enables -O3 -ipo -static -xP
i32, i32em Windows: Enables -O3 -Qipo -QxP

-O3 Enables -O2 optimizations, as well as more aggressive optimizations, such as loop and memory access transformation. -O3 optimizations may slow down code in some cases compared to -O2 optimizations. Recommended for applications that have loops with heavy use of floating point calculations and process large data sets.

-O2 On by default. Optimizes for code speed. This is the generally recommended optimization level.

-O1 Optimizes to favor code size and code locality. Disables loop unrolling. -O1 may improve performance for applications with very large code size, many branches, and execution time not dominated by code within loops. In most cases, -O2 is recommended over -O1.

-Od (Linux: -O0) Turns off all optimizations. Use this option for debugging and quick compiles.

Compiler Option Quick Reference

Example

prompt>icl -O1 myprog.cpp