3 ms·
Fwiw, autovectorizers tend to be pretty conservative about it. So to use cutting edge instructions you generally have to hand code them (either in intrinsics l
by VHRanger 8y ago
Fwiw, autovectorizers tend to be pretty conservative about it.
So to use cutting edge instructions you generally have to hand code them (either in intrinsics like Lemire did there or in asm)
- BeeOnRope 8y agoEspecially for FP instructions, where compilers are heavily restricted by the standard and IEEE754 semantics. Vectorization often changes the order of operations and since FP math is generally not associative. For integer operations, auto-vectorization is more prevalent since everything can be reordered more freely. clang especially auto-vectorizes a ton of stuff even at -O2.
- int_19h 8y agoBut that's precisely why most language standards don't require strict IEEE754 semantics. And why people mostly compile with -ffast-math or equivalent when they do.