3 ms·
In neither of those did the sequence change direction, though?
by taeric 4y ago
In neither of those did the sequence change direction, though?
- thrwawy74 4y agoSee this is why I felt I was obsessing over something very small. Loop inversion, unrolling, and splitting. The compiler can do so much with a loop to make it run faster on 'this machine' to optimize for speed, memory use, or binary size.
- whoopdedo 4y agoSorry, I didn't copy the assembler output for brevity but Clang generates `decl %esi` (or `addl $-1,%ebx` depending on the version) in the first case.
- taeric 4y agoDo you know of any cases where it changes the sequence of seen values? I'm assuming it can in this case, because the i is never used?