Cargando…

Efficient Verified Implementation of Introsort and Pdqsort

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

Descripción completa

Detalles Bibliográficos
Autor principal: Lammich, Peter
Formato: Online Artículo Texto
Lenguaje:English
Publicado: 2020
Materias:
Acceso en línea:https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7324064/
http://dx.doi.org/10.1007/978-3-030-51054-1_18
Descripción
Sumario: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++ Libraries implement 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, closely following the state-of-the-art implementations from GNU and Boost. On an extensive benchmark set, our verified implementations perform on par with the originals.