Re:Flavors of SIMD
by abainbridge on Tuesday February 19, 2019 @05:55PM
(#19203762)
Wow, magic flags I've never seen before - look useful.
As I understand it, -ffast-math is NOT useful here. That only effects floats and doubles.
Yes, that was meant to be a general remar. This probably most often comes up for floating point, at least in my circles, and the similar option to fast-math that the Intel compiler defaults to contributes somewhat to the myth of its greatly superior code. Likewise restrict isn't relevant here -- you'd see notes about aliasing from opt-info otherwise.
I've recently had GCC 8 get about 2/3 the performance on haswell for a generic C optimized DGEMM micro-kernel as the hand-optimized one of similar structure which uses intrinsics/assembler. Without checking, the expert expects the performance difference to be due to prefetch and unrolling, which the generic kernel doesn't leave to the compiler.