HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
Voultapher
sort-research-rs
Rust2023–2026
Voultapher / sort-research-rs

sort-research-rs

Test and benchmark suite for sort implementations.

25Distinct people
47Mentions
0Explicit recommenders
546GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Test and benchmark suite for sort implementations.

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year47 dated mentions

Observed mentions: 2023-02-11 17:42:47 UTC to 2026-09-16 20:15:06 UTC.

05101520252023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 24 mentions; 8 submissions, 16 comments20232024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 8 mentions; 3 submissions, 5 comments20242025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 13 mentions; 8 submissions, 5 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC24816
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC835
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC1385
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC211

From the project README

An excerpt from the repository, fetched Nov 13, 2026.

Read the project’s introduction
sort-research-rs Is a sort implementation correct? Is a sort implementation fast? This repository contains: An exhaustive test suite, including properties not commonly checked or upheld An extensive benchmark suite, abstracting over types, patterns and sizes A fuzzing harness A novel sort implementation ipnsort (Instruction-Parallel-Network-Sort) Vendored sort implementations (Rust, C++, C), e.g. cpp_pdqsort, rust_std_stable Various experiments and demonstrations Results of the research as papers Most tests and benchmarks can be applied to non Rust implementations. This works by implementing the 5 benchmark types as #[repr(C)] and having a defined C API that can be implemented, wrapping the C/C++ sorts. Most functionality is by default disabled via cargo features, see the Cargo.toml. Some functionality can be enabled or switched by setting environment variables. See for example benches/bench.rs. Research results The unreasonable effectiveness of modern sort algorithms ipnsort: an efficient, generic and robust unstable sort implementation. driftsort: an efficient, generic and robust stable sort implementation. Fast, small, robust: pick three. Introducing a novel branchless partition implementation. Safety vs Performance. A case study of C, C++ and Rust sort implementations. 10~17x faster than what? A performance analysis of Intel's x86-simd-sort (AVX-512) A performance analysis of glidesort and ipn_stable Running the tests cargo test cargo miri test # Might require disabling criterion dependency. RUSTFLAGS=-Zsanitizer=address cargo t --release Running the benchmarks cargo bench cargo bench <sort_name>-<prediction_state>-<type>-<pattern>-<size> # Example cargo bench rust_std_stable-hot-u64-random-10000 cargo bench hot-u64-random-10000 cargo bench random You can also set a custom regex to filter the benchmarks you want to run: BENCH_REGEX="std.*i32-random-8$" cargo bench If you want to collect a set of results that can then later be used to create graphs, you can use the run_benchmarks.py utility script: # Will write results to my_test_zen3.json BENCH_REGEX="_stable.*random-" python util/run_benchmarks.py my_test_zen3 To run the graph_all.py script to create graphs from this data you need to first install the dependencies as specified in requirements.txt e.g. on Linux: python -m venv venv source ./venv/bin/active pip install --requirement util/graph_bench_result/requirements.txt Afterwards, you can use the graph_all.py script: python util/graph_bench_result/graph_all.py my_test_zen3.json Fuzzing You'll need to install cargo fuzz and cargo afl respectively. See https://rust-fuzz.github.io/book/introduction.html. Fuzzing with libfuzzer cd fuzz cargo fuzz run libfuzzer_main Fuzzing with afl cd fuzz-afl RUSTFLAGS=-Zsanitizer=address cargo afl build --release && cargo afl fuzz -i in -o out -D target/release/afl Adjust fuzz/fuzz_targets/libfuzzer_main.rs and fuzz/fuzz_targets/libfuzzer_main.rs respectively to change the fuzz target. Default rust_ipn_stable. Contributing Please respect the CODE_OF_CONDUCT.md when contributing. Adding a new sort implementation Please open an issue before investing the effort of adding a new sort implementation. The maintainer of this project is currently not interested in building an up-to-date database of all existing sort implementations. Implementations are added based on situational context and relevance to the maintainers' goals. Baseline for all new sort implementations is they must pass all functionality tests, they may pass the safety tests but don't have to. Authors Lukas Bergdoll - Voultapher See also the list of contributors who participated in this project. License This project is licensed under the Apache License, Version 2.0 - see the LICENSE.md file for details.
Read the full README on GitHub

What Hacker News says

47 sources
> The implementations of sort in Rust are filled with unsafe. Strictly speaking, the mere presence of `unsafe` says nothing on its own about whether "it" is easier in C++. Not only does `unsafe` on its own say nothing about the "difficulty" of the code it contains, but that is just one factor of one side of a comparison - very much insufficient for a complete conclusion. Furthermore, "just" writing a sorting algorithm is pretty straightforwards both in Rust and C++; it's the more interesting properties that tend to make for equally interesting implementations, and one would need to procure Rust and C++ implementations with equivalent properties, preferably from the same author(s), for a proper comparison. Past research has shown that Rust's current sorting algorithms have different properties than C++ implementations from the time (e.g.,
Read the rest
the "X safety" results in [0]), so if nothing substantial has changed since then there's going to be some work to do for a proper comparison. Edit: forgot to add the reference [0]: https://github.com/Voultapher/sort-research-rs/blob/main/wri...
In Kernel bugs hide for 2 years on average. Some hide for 20
It's complicated: https://github.com/Voultapher/sort-research-rs/blob/main/wri... The left chart there is the proposed (now current) Rust unstable sort, named IPN Sort and the right chart is the old (at the time current) unstable sort That nice black triangle line going straight up and to the right is random input, a typical input for testing sort performance. Compare those essentially flat lines at the bottom in orange and green, for the easy ascending and descending inputs (sorting them is no work, or trivial as appropriate) and the distinct brown circle s95 which is markedly worse than the black line. s95 is 95% sorted data, plus 5% random data, which is what you'd see if you: 1. sort container of N Things 2. do work which overall removes about 0.05 x N Things, maybe they're completed 3. add 0.05 x N Things, maybe they're new 4. repeat
Read the rest
from step 1 Compared to the usual test workload this is actually more work because indeed it's mostly sorted but the non-sorted parts are far out of position. The vertical on these charts is mean comparisons per item, that is if we can sort 100 items with total 1000 comparisons, that scores 10 on the vertical axis, the reason to do this is that it's independent of physical realisation. Because the horizontal axis is log size a horizontal line means the sort is O(n) for that class of input, a diagonal means O(n log n) which is what we're hoping for from a sort algorithm.
In Anonymous structavaganza in Zig
Since you seem to enjoy this kind of writing I'd love to get your feedback on something I've written a while back about branchless partitioning [1]. Despite it being content wise the most work to create of the things I've written about the topic, it found much less attention than other things I've written. So far I've wondered if it was maybe too technical? Would love to get an honest opinion. [1] https://github.com/Voultapher/sort-research-rs/blob/main/wri...
In Improving performance of rav1d video decoder
I'm on Chrome and the page was fine-ish after the first full scroll, but that first scroll was quite laggy. Note, I'm extra sensitive to this kind of stuff. > Apple's M series chips aren't really all that powerful, but they are very power efficient. In terms of single threaded performance, they are both. Especially the IPC is very impressive take a look at for example https://github.com/Voultapher/sort-research-rs/blob/main/wri... > Assuming the same instructions per cycle (IPC) and mapping of instructions to cycles, Zen 3 should be ~1.53x faster than Firestorm by virtue of clock frequency. Yet the micro-architecture released in the same year as Zen 3, goes from exceeding it to closely trailing it in terms of absolute throughput when the effects of branch misprediction are minimized. Their newest generation of P-cores is simply unmatched
Read the rest
in terms of ST perf, an M4 core can do 4k points in Geekbench ST, AMD's best Desktop offering does ~3.5k at a much higher clock frequency. For web browsing ST perf is king.
In Nice things with SVG

Showing the 15 most recent of 47 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.