Branchless sorting of trivially relocatable types
A few days ago Christof Kaser posted a very impressive blog post on
“Fast Branchless Quicksort using Sorting-Networks”
(chkas/blqsort). A “branchless” algorithm is
one designed to exploit modern processors’ conditional-move instructions. So for
example the blqs::sort2 primitive, which looks like this:

