3 ms·
You can partition the list with zero branches (aside from the loop test.) You don't need to sort it. (Though, of course, the original algorithm can be written
by repsilat 9y ago
You can partition the list with zero branches (aside from the loop test.) You don't need to sort it.
(Though, of course, the original algorithm can be written in a one-pass branchless fashion anyway, so the point is kinda moot.)