ABSTRACT. Sorting algorithms are an important part of most standard libraries, and both, their correctness and efficiency is crucial for many applications.
As generic sorting algorithm, the GNU C++ Standard Library implements the Introsort algorithm, a combination of quicksort, heapsort, and insertion sort. The Boost C++ library implements Pdqsort, an extension of Introsort that achieves linear runtime on inputs with certain patterns.
We verify Introsort and Pdqsort in the Isabelle LLVM verification framework, including most of the optimizations from the GNU and Boost implementations. On an extensive benchmark set, our verified algorithms perform on par with the originals.