Compiling and Linking for Optimization

By default, all Fortran source files are separately compiled into individual object files.

If you want to allow full interprocedural optimizations to occur, you must use the -ipo (Linux and Mac OS) or /Qipo (Windows) option.

By default, compilation is done with -O2 (Linux and Mac OS X) or /O2 (Windows). If you want to see if your code will benefit from some added optimizations, use O3. These aggressive optimizations may or may not improve your code speed.

For complete information about optimization, see Compiler Optimizations Overview in Optimizing Applications.