Automatic Optimizations Overview

Intel® compilers allow you to compile applications for processors based on IA-32 architectures (32-bit applications), Intel® 64 architectures (32-bit and 64-bit applications), or IA-64 architectures (64-bit applications).

Intel compilers support the ability to automatically optimize applications for a targeted processor and architecture. While the compiler uses a default options that automatically chooses the best all-around optimizations for most applications, the compilers provide the ability to select optimizations based on your specific applications needs.

The following table summarizes the common compiler-supported optimization options you can use for quick, effective results.

Linux* and Mac OS*

Windows*

Description

-O3

/O3

Enables aggressive optimization for code speed. Recommended for code with loops that perform calculations or process large data sets.

-O2 (or -O)

/O2

Affects code speed. This is the default option; the compiler uses this optimization level if you do not specify anything.

-O1

/O1

Affects code size and locality. Disables specific optimizations.

-fast

/fast

Enables a collection of common, recommended optimizations for run-time performance.

-O0

/Od

Disables optimization. Use this for rapid compilation while debugging an application.

The variety of optimizations used by the Intel compiler enable you to quickly enhance the application performance. In addition to optimizations invoked by the compiler command-line options, the compiler includes features which enhance your application performance such as directives, pragmas, intrinsics, run-time library routines and various utilities.

The remaining topics in this section provide more details on the automatic optimizations supported in the Intel compilers. See Enabling Automatic Optimizations and Restricting Optimizations for more information.