Show HN: Glidesort, a new stable sort in Rust up to ~4x faster for random data (opens in a new tab)github.com
389 pointsHi all, I've talked about glidesort a few times on HN already, but it's finally ready for release. If you have any questions, feel free to ask. An academic paper on glidesort that goes into a lot more detail than the readme is upcoming, but is not ready yet.
I will be giving a talk on glidesort tomorrow at FOSDEM 2023 in the Rust Devroom at 16:10, you can seek me out there as well. In other news, I am leaving academia soon, so if you have interesting (Rust) jobs the coming months feel free to approach me.
Comments (70) 12 threads
Show all comments
Showing thread 6 of 12
https://i.imgur.com/AUOJ1w0.png
https://i.imgur.com/AP6DnIS.png
Note that the four bottom sorts (RustSort, StdSort, Pdqsort, IPS4o) are not stable. GlidesortN is glidesort using n elements of memory, Glidesort is the default memory setting and Glidesort1024 uses a fixed 1024 element buffer.
Arm is a 2021 Apple M1, Amd is a 2018 Threadripper 2950x.
One thing glidesort appears to do extremely well is to branchless merge till the very end, this gets quite tricky when memory constrained. It does not seem worth it intuitively, but judging from the performance of rotate mergesort, it probably is.
And there was some prior discussion on HN here: https://news.ycombinator.com/item?id=33827843