Sort large slices of integers or floats quickly while using very little extra memory.
Speed up sorting key-value pairs, such as struct records, using a custom key function.
Sort very large arrays in parallel across multiple CPU cores without a big memory cost.
Iterate over a map's entries or a slice's values in sorted order without fully re-sorting them.
| klauspost/radsort | adisbladis/nix-cache-beacon | aspecttaleadapter/adobe-lightroom-classic-15-3-full | |
|---|---|---|---|
| Stars | 25 | 25 | 25 |
| Language | Go | Go | Go |
| Setup difficulty | easy | hard | easy |
| Complexity | 2/5 | 4/5 | 1/5 |
| Audience | developer | ops devops | general |
Figures from each repo's GitHub metadata at analysis time.
Radsort is a Go library that implements a fast sorting algorithm called LSD radix sort, based on a 2026 research paper by Robert Clausecker and Florian Schintke. It is a Go port of the paper authors' original C code. The main selling point is memory efficiency: most radix sort implementations need a second array as big as the input to work with, but radsort gets by with only a small, fixed amount of extra memory, roughly the square root of the input size. It achieves this by treating the input as a sequence of fixed size blocks and reusing each block as output space right after it has been read, instead of allocating a whole separate buffer. A small tracking array keeps note of where each block currently lives, so the actual data barely needs to be moved until a final step puts everything back in the caller's original slice. The sort keeps equal elements in their original relative order, a property called stability. The library provides ready to use functions for common Go types such as unsigned and signed integers of different sizes, plus floating point numbers, and a generic function for sorting any custom type by a key you provide. It also offers ways to reuse memory buffers across repeated calls so nothing new is allocated after the first run, to iterate over a slice or map in sorted order without fully rewriting it, and a parallel version that spreads the work across multiple CPU cores while keeping the same low memory use. The README backs its claims with detailed benchmark tables comparing radsort against Go's standard library sort across different input sizes and data patterns, showing large speed advantages on random data of moderate to large size, though the standard sort wins on very small inputs and on data that is already sorted or nearly sorted, since it can detect and skip that work.
A Go library for fast, memory-efficient radix sorting of integers, floats, and custom types, with a parallel mode for very large slices.
Mainly Go. The stack also includes Go.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
double-check against the repo, no cap.