| ▲ | Branchless Quicksort faster than std:sort and pdqsort with C and C++ API(tiki.li) | ||||||||||||||||
| 47 points by birdculture 2 days ago | 7 comments | |||||||||||||||||
| ▲ | orlp an hour ago | parent | next [-] | ||||||||||||||||
Since pdqsort (an older project of mine) was mentioned, I felt it wouldn't be entirely inappropriate to mention that I've since then collaborated with Lukas Bergdoll to provide two high-quality sort implementations for the Rust standard library, ipnsort (unstable) and driftsort (stable). So if you use Rust, you get these by simply calling [T]::sort(_unstable). Great performance out of the box :) On my machine (Apple M2), using the benchmarks from the repository on Apple clang 17 and Rust 1.98 nightly:
And now for a cool party trick, let's repeat the 50 million doubles experiment again, but have the first 90% already sorted, last 10% random: | |||||||||||||||||
| ▲ | mgaunard 2 hours ago | parent | prev | next [-] | ||||||||||||||||
Aren't there several bitonic sort network implementations that are vectorized, Intel's in particular? Why not compare against that? | |||||||||||||||||
| |||||||||||||||||
| ▲ | davidkwast 2 hours ago | parent | prev [-] | ||||||||||||||||
It is so simple that I had to look very slowly to understand. Nicely done. | |||||||||||||||||
| |||||||||||||||||