blqsort - A C++ Quicksort Faster Than std::sort

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 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.

blqsort on Github


The following benchmarks show the execution times for sorting 50 million random doubles using different sorting implementations. The measurements were taken on an Apple M1 system using Clang and on an Intel i5-9300H Linux system using GCC, both compiled with the -O3 option.