A C++ Quicksort Faster Than std::sort
cppdashboard.dev/r/2026/11/a-cpp-quicksort-faster-than-std-sortblqsort is a very fast quicksort algorithm. I am not aware of any other general-purpose comparison-based sorting algorithm that is faster on random data. Only specialized SIMD-based algorithms are generally faster when dealing with small…
From the article
blqsort is a very fast quicksort algorithm. I am not aware of any other general-purpose comparison-based sorting algorithm that is faster on random data. Only specialized SIMD-based algorithms are generally faster when dealing with small primitive data types.
The main ideas are branchless partitioning, sorting networks for small partitions and robust pivot selection.
The implementation is available on GitHub under the MIT license. There is also a C version of it, including multithreaded versions, each as a single header file.
Share this resource