blqsort is a high-performance C++ quicksort implementation that uses branchless partitioning, sorting networks for small subarrays, and robust pivot selection to achieve roughly 2x speedup over std::sort on random data benchmarks. Benchmarks on Apple M1 and Intel i5 show execution times of 0.67s and 1.33s respectively for 50M doubles, compared to std::sort's 1.33s and 4.97s. The project also provides multithreaded versions and single-header C implementations.
Background
std::sort from the C++ standard library is typically implemented as IntroSort (a hybrid of quicksort, heapsort, and insertion sort) and has been the go-to sorting algorithm for decades. High-performance custom sort algorithms continue to push boundaries in benchmark-driven scenarios such as competitive programming and data-intensive applications.
- Source
- Lobsters
- Published
- Nov 9, 2026 at 08:55 PM
- Score
- 7.0 / 10