# A Novel Hybrid Quicksort Algorithm Vectorized using AVX-512 on Intel   Skylake

**Authors:** Berenger Bramas

arXiv: 1704.08579 · 2018-03-13

## TL;DR

This paper introduces a new hybrid Quicksort algorithm optimized with AVX-512 vectorization on Intel Skylake CPUs, significantly improving sorting performance for various data types compared to existing libraries.

## Contribution

It presents a novel two-part hybrid Quicksort leveraging AVX-512, combining a new partitioning method with a branch-free Bitonic sort for small arrays.

## Key findings

- Achieves 4x faster sorting than GNU C++ std::sort
- Outperforms Intel IPP library by 1.4x
- Effective adaptation of classical algorithms with AVX-512

## Abstract

The modern CPU's design, which is composed of hierarchical memory and SIMD/vectorization capability, governs the potential for algorithms to be transformed into efficient implementations. The release of the AVX-512 changed things radically, and motivated us to search for an efficient sorting algorithm that can take advantage of it. In this paper, we describe the best strategy we have found, which is a novel two parts hybrid sort, based on the well-known Quicksort algorithm. The central partitioning operation is performed by a new algorithm, and small partitions/arrays are sorted using a branch-free Bitonic-based sort. This study is also an illustration of how classical algorithms can be adapted and enhanced by the AVX-512 extension. We evaluate the performance of our approach on a modern Intel Xeon Skylake and assess the different layers of our implementation by sorting/partitioning integers, double floating-point numbers, and key/value pairs of integers. Our results demonstrate that our approach is faster than two libraries of reference: the GNU \emph{C++} sort algorithm by a speedup factor of 4, and the Intel IPP library by a speedup factor of 1.4.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1704.08579/full.md

## Figures

17 figures with captions in the complete paper: https://tomesphere.com/paper/1704.08579/full.md

## References

18 references — full list in the complete paper: https://tomesphere.com/paper/1704.08579/full.md

---
Source: https://tomesphere.com/paper/1704.08579