用于半排序及相关问题的高性能、灵活并行算法
High-Performance and Flexible Parallel Algorithms for Semisort and Related Problems
AI总结:
本文提出一种高性能、接口灵活的并行半排序算法,并扩展至直方图与收集-归约,在多种设置和真实应用中优于现有并行排序方法。
摘要:
半排序(semisort)是一种基础算法原语,广泛用于高效并行算法的设计与分析。它接收一个记录数组以及一个从每条记录中提取键(key)的函数作为输入,并对记录重新排序,使具有相同键的记录连续排列。由于许多应用只需要收集相等的值,而不需要对输入进行完全排序,因此半排序具有广泛适用性,例如用于字符串算法、图分析和几何处理等众多领域。然而,尽管最近有数十篇论文在其理论分析中使用半排序,并且已经存在一种渐近最优的并行半排序算法,但由于现有半排序实现可能存在性能问题,实践中大多数这些并行算法的实现仍选择使用比较排序或整数排序来实现半排序。本文重新审视半排序问题,目标是获得一种具有灵活接口的高性能并行半排序实现。我们的方法可以轻松扩展到两个相关问题:histogram(直方图)和 collect-reduce(收集-归约)。我们的算法在实践中取得了显著的加速,并且重要的是,在我们测试的几乎所有设置下(包括不同的输入规模、分布和键类型),都优于最先进的并行排序和半排序方法。我们还使用真实世界数据测试了两个重要应用,结果表明我们的算法相比现有方法提升了性能。我们相信,许多其他并行算法实现也可以利用我们的研究成果得到加速。
英文摘要:
Semisort is a fundamental algorithmic primitive widely used in the design and analysis of efficient parallel algorithms. It takes input as an array of records and a function extracting a \emph{key} per record, and reorders them so that records with equal keys are contiguous. Since many applications only require collecting equal values, but not fully sorting the input, semisort is broadly applicable, e.g., in string algorithms, graph analytics, and geometry processing, among many other domains. However, despite dozens of recent papers that use semisort in their theoretical analysis and the existence of an asymptotically optimal parallel semisort algorithm, most implementations of these parallel algorithms choose to implement semisort by using comparison or integer sorting in practice, due to potential performance issues in existing semisort implementations. In this paper, we revisit the semisort problem, with the goal of achieving a high-performance parallel semisort implementation with a flexible interface. Our approach can easily extend to two related problems, \emph{histogram} and \emph{collect-reduce}. Our algorithms achieve strong speedups in practice, and importantly, outperform state-of-the-art parallel sorting and semisorting methods for almost all settings we tested, with varying input sizes, distribution, and key types. We also test two important applications with real-world data, and show that our algorithms improve the performance over existing approaches. We believe that many other parallel algorithm implementations can be accelerated using our results.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。