Source code used in the quicksort experiments of the thesis On the Analysis of Two Randomized Algorithms: Multi-Pivot Quicksort and Efficient Hash Functions.
The code includes (see src/algorithms/):
- single pivot quicksort variants
- different dual pivot quicksort variants
- a three-pivot quicksort variant
- different variants of super-scalar sample sort
- a generator for k pivot quicksort using different sampling strategies, see the ruby-scripts subdirectory. If you have ever wondered how a 15-pivot quicksort algorithm looks like, here it is. You might imagine why there is a script for generating the code.
Note that all algorithms are tested on random permutations. They don't take measures to avoid worst-case inputs or somehow adapt to the input.
A summary plot from our TALG paper.
Needs g++, cmake in version >= 2.8, libboost-random and libpapi for performance measurements. (Enabled by default, can be changed in CMakeLists.txt.)
Use the following commands on the top-level directory of the project.
mkdir build; cd build cmake .. make
For a release build with optimization flags, use
cmake -DCMAKE_BUILD_TYPE=Release
After successful compilation, the executable is located at build/src/qstest.
Example calls can be found in the directory examples.
Parts of the code were developed with the help of Timo Bingmann and Sebastian Wild. Basic toolkit to run experiments and measure running times provided by Timo Bingmann. (http://www.panthema.net)