orlp/glidesort
View on GitHub ↗ ★ 1,658 Rust
A Rust implementation of Glidesort, my stable adaptive quicksort/mergesort hybrid sorting algorithm.
8 mentions on Hacker News by 4 people: 2 stories, 6 comments · first 2023-02-03 · latest 2026-06-05
20082026
-
It's called driftsort because it's derived from another sort I made, glidesort: https://github.com/orlp/glidesort . Glidesort is a bit faster still for large inputs, however it was too large and complex for inclusion in the standard…
comment by orlp · 2026-06-05 · in Branchless Quicksort faster than std:sort and pdqsort with C and C++ API -
For context this is written by the creator of Glidesort: https://github.com/orlp/glidesort
comment by killcoder · 2023-03-06 · in The Smallest Hash Table -
…branchless partition operator that switches between overwriting / cmov'ing depending on data size ( https://github.com/orlp/glidesort/blob/56cacab4e378e75ab6feb... ), my own bidirectional partitioning scheme, my own pivot selection scheme,…
comment by orlp · 2023-02-04 · in Show HN: Glidesort, a new stable sort in Rust up to ~4x faster for random data -
…my question If you are reading the code, the whole small-memory magic happens in physical_merge: https://github.com/orlp/glidesort/blob/master/src/physical_m... . Lines 46-59 are the large-enough memory happy path. Lines 60-65 is the…
comment by orlp · 2023-02-03 · in Show HN: Glidesort, a new stable sort in Rust up to ~4x faster for random data -
…will fail when the scratch space isn't big enough, which mostly answers my question https://github.com/orlp/glidesort/blob/master/src/physical_m... . But I'm still not sure how that failure causes the overall algorithm to change (I have…
comment by timerol · 2023-02-03 · in Show HN: Glidesort, a new stable sort in Rust up to ~4x faster for random data -
…some code that will make glidesort back off and use less memory if the allocation request fails: https://github.com/orlp/glidesort/blob/master/src/lib.rs#L20... The sad part is that this will probably never work in reality due to…
comment by orlp · 2023-02-03 · in Show HN: Glidesort, a new stable sort in Rust up to ~4x faster for random data