Optimize for speed of execution using a selection of options.
SPARC: 77/90 x86:77
Select options that optimize for speed of execution without excessive compilation time. This option provides close-to-the-maximum performance for many applications.
If you compile and link in separate steps, and you compile with -fast, then be sure to link with -fast.
This option is defined as a particular selection of other options that is subject to change from one release to another, and between compilers. Also, some of the options selected by -fast may not be available on some platforms.
SPARC | x86 |
---|---|
-dalign |
-- |
-depend |
-- |
-fns |
-fns |
-fsimple=1 |
-- |
-ftrap=%none | -ftrap=%none |
-libmil (f77) -f (f90) | -libmil |
-native | -native |
-- | -nofstore |
-O4 | -O4 |
-xlibmopt | -xlibmopt |
Details about the options selected by -fast:
The -native hardware target. If the program is intended to run on a different target than the compilation machine, follow the -fast with a code-generator option. For example: f77 -fast xtarget=ultra ...
The -O4 optimization level option.
The -depend option (SPARC only).
The -libmil option for system-supplied inline expansion templates. For C functions that depend on exception handling, follow -fast by -nolibmil: -fast -nolibmil. With -libmil, exceptions cannot be detected with errno or matherr(3m).
The -fsimple=1 option for a simple floating-point model. -fsimple is unsuitable if strict IEEE 754 standards compliance is required.
The -dalign option to generate double loads and stores (SPARC only). Using this option may generate nonstandard Fortran data alignment.
The -xlibmopt option (SPARC only)
-nofstore (x86 only)
-fns -ftrap=%none to turn off all trapping.
With f90, the -f option is substituted for -libmil on SPARC.
It is possible to add or subtract from this list by following the -fast option with other options, as in:
f77 -fast -fsimple=2 -xnolibmopt ...
which overrides the -fsimple=1 option and disables the -xlibmopt selected by -fast.