3 ms·
And for a counterpoint that it's still the case that compilers can produce horrible codegen from intrinsics in 2017, this entire thread: http://www.realworldtec
by brigade 9y ago
And for a counterpoint that it's still the case that compilers can produce horrible codegen from intrinsics in 2017, this entire thread: http://www.realworldtech.com/forum/?threadid=166719 http://www.realworldtech.com/forum/?threadid=166719
- zvrba 9y agoOh. He used 14 registers to manually unroll the inner loop. IME, on modern architectures, manual unrolling doesn't win you anything (benchmarked on, among other things, the above-mentioned dotproduct). I wouldn't be surprised if he got close to optimal code by just NOT manually unrolling. Fewer registers used, compiler less confused.
- rurban 9y agoI thought M.Matz recently fixed the register allocation mess, but apparently only the most egregious parts. See the old official pre-Matz gcc statements on the mess https://gcc.gnu.org/wiki/RegisterAllocation https://gcc.gnu.org/wiki/RegisterAllocation