by paulddraper · 3w ago · 0 comments
This uses a bunch of low-level tricks and alternate stragies to beat std::sort on random data.
The primary advantage is branchless partitioning, which is a big win for random data, which hurts branch prediction for quicksort.
But it is a sensible improvement.
(EDIT: I typoed my original comment. It O(n^2) space; worst case is O(n) space and O(n^2) time for the vanilla alg.)