Compilation for floating-point performance
You can change some default floating-point options to enhance performance of floating-point intensive programs.
Some of these options can affect conformance to floating-point standards. Using these options can change the results of computations, but in many cases the result is an increase in accuracy.
Recommendations
Follow these guidelines:
- For single-precision programs on POWER family and POWER2 platforms, you can enhance
performance while preserving accuracy by using these floating-point options:
-qfloat=fltint:rsqrt:hssngl
If your single-precision program is not memory-intensive (for example, if it does not access more data than the available cache space), you can obtain equal or better performance, and greater precision, by using:
-qfloat=fltint:rsqrt -qautodbl=dblpad4
For programs that do not contain single-precision variables, use -qfloat=rsqrt:fltint only. Note that -O3 without -qstrict automatically sets -qfloat=rsqrt:fltint.
- Single-precision programs are generally more efficient than double-precision programs, so promoting default REAL values to REAL(8) can reduce performance. Use the following -qfloat suboptions: