First of all, I do not recommend using it -ffast-mathfor the following reasons:
, ,
( ) . , " "
.
IEEE
,
.
,
. "" ( ) : ,
OS, . , ,
.
- ,
, ,
(IEEE-) ,
,
.
, .
-Ofast ( -ffast-math). :
-Ofast
. -Ofast -O3. , . -ffast-math Fortran-specific -fno-protect-parens -fstack-arrays.
, -O4. , , GCC . , - -O3, , , .
-funroll-loops - , / , ( ).
2 : -march=native -mfpmath=sse. -O3, -march=native , . -mfpmath=sse XMM ( x87).
, , , , , / . SIMD, SSE Intrinsics Vectorization, , . / ( ) .
, , . GCC , -ftree-vectorize, , -O3 ( -ftree-vectorize ). , GCC , -. ( ), . . .
, Eigen, ++, . , . -, . - , , , , , , .. Eigen ( SSE, Vectorization ..), .