4 comments

[ 2.7 ms ] story [ 22.7 ms ] thread
If what the author discovered is true - i.e. he didn't do any mistake, the results should hold true for any modern ARM core, not just for M1.
Any modern x86 core should have been able to get the same result.

I would expect the loop to be unrolled 3, 7 or 21 times to remove all conditionals. Then the math can be dispatched at one operation per cycle for each stream.

There must have been something in the compiled assembly that broke the optimisation.

Definitely need the assembly to ensure that the compiler is producing like for like code.
Yea gonna need to see the assembly code here.