基于Intel Skylake的AVX-512向量化混合快速排序算法
A Novel Hybrid Quicksort Algorithm Vectorized using AVX-512 on Intel Skylake
摘要:
现代CPU的设计由分层存储器和SIMD/向量化能力组成,控制着将算法转换为高效实现的潜力。AVX-512的发布从根本上改变了事情,并促使我们寻找一个有效的排序算法,可以利用它。在本文中,我们描述了我们发现的最佳策略,这是一种新的两部分混合排序,基于著名的Quicksort算法。中心分区操作由一种新的算法执行,小分区/数组使用基于Bitonic的无分支排序进行排序。这项研究也是一个例子,说明如何经典算法可以适应和增强的AVX-512扩展。我们评估了我们的方法在现代英特尔至强Skylake上的性能,并通过对整数、双浮点数和整数的键/值对进行排序/分区来评估我们实现的不同层。我们的结果表明,我们的方法比两个参考库更快:GNU \emph{C++}排序算法的加速因子为4,英特尔IPP库的加速因子为1.4。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。