Standard Optimization Settings

Both the Intel® Compiler for 32-bit Applications and the Intel Compiler for Itanium®-based Applications automatically optimize applications for the target processor when you select an option setting. The table below lists the available settings, for both Windows* and Linux*, and describes their typical uses.

Option Setting

Description

Notes

Windows*

Linux*

-Od

-O0

No Optimizations
You can use this option during the early stages of application development, until you know the application is working correctly; then option to a higher setting, usually /O2.

 

-O1

-O1

Minimize Size
Omits optimizations that tend to increase object size.

Creates the smallest code in the majority of cases.

For applications sensitive to code size and code locality.

Example: large database applications; code with many branches and not dominated by loops

-O1 implies -Oi, but some applications that are sensitive to code size and locality may benefit from -Oi. Hence, you may want to try -O1 -Oi.

-O2

-O2

Maximize Speed
Default setting. Adds intrinsic function inlining to /O1 optimizations.

Creates the fastest code in most cases, but may increase code size significantly more than /O1.

For best overall performance on typical integer applications that do not make heavy use of floating point math.

-O3

-O3

High Level Optimizations
Same as /O2, plus loop transformation and data prefetching.

For applications that make heavy use of floating point calculations on large data sets

Limited support for IA-32 C++ compiler for Linux*. See the User's Guide for more information.

-Zi

-g

Create Symbols
Enables generating debug information (.pdb for Windows Visual C++*).

Adds info to the binary so that any particular assembly line can be associated with its corresponding C code.

Use this option when tuning your application's performance using the VTune™ Performance Analyzer or a similar tool.