3 ms·
That doesn't reduce the number of cells touched, and would make the algorithm more complicated. It would also probably hurt cache locality. Going backwards is a
by tbabb 10y ago
That doesn't reduce the number of cells touched, and would make the algorithm more complicated. It would also probably hurt cache locality. Going backwards is also pointless complication, you could just as easily cut into two sections and go forward in both.
And furthermore why split in two? Why not split the range into three sections, or four, or N and completely unroll the loop?
Probably not a good-tasting construct at all.