On current x86 and x86_64 processors denormal numbers are handled as a special case and very slowly. This can have a detrimental impact on the performance of numerical programs. A common fix for this problem, at the cost of some numerical stability, is to set the processor flag to flush denormals to zero.
This can be achieved in C with the following on SSE machines: _MM_SET_FLUSH_ZERO_MODE (_MM_FLUSH_ZERO_ON); However it is not desirable to include C in a fortran program or library. Other compiler tackle this by adding flags (ifort, NAG f95) or environment variables (g95) which set this flush mode during program initialization. It would be good if gfortran offered a similar facility (I have not been able to locate any reference to one at the moment). -- Summary: Flush denormals to Zero Flag Product: gcc Version: 4.3.1 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: J dot Hogg at rl dot ac dot uk http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36821