理论高效和实用的并行就地基数排序

Omar Obeya, Endrias Kahssay, Edward Fan, Julian Shun
{"title":"理论高效和实用的并行就地基数排序","authors":"Omar Obeya, Endrias Kahssay, Edward Fan, Julian Shun","doi":"10.1145/3323165.3323198","DOIUrl":null,"url":null,"abstract":"Parallel radix sorting has been extensively studied in the literature for decades. However, the most efficient implementations require auxiliary memory proportional to the input size, which can be prohibitive for large inputs. The standard serial in-place radix sorting algorithm is based on swapping each key to its correct place in the array on each level of recursion. However, it is not straightforward to parallelize this algorithm due to dependencies among the swaps. This paper presents Regions Sort, a new parallel in-place radix sorting algorithm that is efficient both in theory and in practice. Our algorithm uses a graph structure to model dependencies across elements that need to be swapped, and generates independent tasks from this graph that can be executed in parallel. For sorting n integers from a range r, and a parameter K, Regions Sort requires only O(Kłog rłog n) auxiliary memory. Our algorithm requires O(nłog r) work and O((n/K+łog K)łog r) span, making it work-efficient and highly parallel. In addition, we present several optimizations that significantly improve the empirical performance of our algorithm. We compare the performance of Regions Sort to existing parallel in-place and out-of-place sorting algorithms on a variety of input distributions and show that Regions Sort is faster than optimized out-of-place radix sorting and comparison sorting algorithms, and is almost always faster than the fastest publicly-available in-place sorting algorithm.","PeriodicalId":369832,"journal":{"name":"The 31st ACM Symposium on Parallelism in Algorithms and Architectures","volume":"38 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2019-06-17","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"18","resultStr":"{\"title\":\"Theoretically-Efficient and Practical Parallel In-Place Radix Sorting\",\"authors\":\"Omar Obeya, Endrias Kahssay, Edward Fan, Julian Shun\",\"doi\":\"10.1145/3323165.3323198\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Parallel radix sorting has been extensively studied in the literature for decades. However, the most efficient implementations require auxiliary memory proportional to the input size, which can be prohibitive for large inputs. The standard serial in-place radix sorting algorithm is based on swapping each key to its correct place in the array on each level of recursion. However, it is not straightforward to parallelize this algorithm due to dependencies among the swaps. This paper presents Regions Sort, a new parallel in-place radix sorting algorithm that is efficient both in theory and in practice. Our algorithm uses a graph structure to model dependencies across elements that need to be swapped, and generates independent tasks from this graph that can be executed in parallel. For sorting n integers from a range r, and a parameter K, Regions Sort requires only O(Kłog rłog n) auxiliary memory. Our algorithm requires O(nłog r) work and O((n/K+łog K)łog r) span, making it work-efficient and highly parallel. In addition, we present several optimizations that significantly improve the empirical performance of our algorithm. We compare the performance of Regions Sort to existing parallel in-place and out-of-place sorting algorithms on a variety of input distributions and show that Regions Sort is faster than optimized out-of-place radix sorting and comparison sorting algorithms, and is almost always faster than the fastest publicly-available in-place sorting algorithm.\",\"PeriodicalId\":369832,\"journal\":{\"name\":\"The 31st ACM Symposium on Parallelism in Algorithms and Architectures\",\"volume\":\"38 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2019-06-17\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"18\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"The 31st ACM Symposium on Parallelism in Algorithms and Architectures\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/3323165.3323198\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"The 31st ACM Symposium on Parallelism in Algorithms and Architectures","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3323165.3323198","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 18

摘要

几十年来,并行基数排序在文献中得到了广泛的研究。然而,最有效的实现需要与输入大小成比例的辅助内存,这对于大输入来说可能是令人望而却步的。标准的串行就地基数排序算法是基于在递归的每个级别上将每个键交换到数组中的正确位置。然而,由于交换之间的依赖关系,并行化该算法并不简单。本文提出了一种新的并行就地基数排序算法——区域排序算法,该算法在理论和实践上都是高效的。我们的算法使用一个图结构来对需要交换的元素之间的依赖关系进行建模,并从这个图中生成可以并行执行的独立任务。对于从范围r和参数K中排序n个整数,区域排序只需要O(Kłog rłog n)辅助内存。我们的算法需要O(nłog r)功和O((n/K+łog K)łog r)跨度,使其工作效率高,并行度高。此外,我们提出了几个优化,显着提高了我们的算法的经验性能。我们比较了Regions Sort在各种输入分布上与现有的并行就地和非就地排序算法的性能,并表明Regions Sort比优化的非就地基数排序和比较排序算法更快,并且几乎总是比最快的公开可用的就地排序算法更快。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
Theoretically-Efficient and Practical Parallel In-Place Radix Sorting
Parallel radix sorting has been extensively studied in the literature for decades. However, the most efficient implementations require auxiliary memory proportional to the input size, which can be prohibitive for large inputs. The standard serial in-place radix sorting algorithm is based on swapping each key to its correct place in the array on each level of recursion. However, it is not straightforward to parallelize this algorithm due to dependencies among the swaps. This paper presents Regions Sort, a new parallel in-place radix sorting algorithm that is efficient both in theory and in practice. Our algorithm uses a graph structure to model dependencies across elements that need to be swapped, and generates independent tasks from this graph that can be executed in parallel. For sorting n integers from a range r, and a parameter K, Regions Sort requires only O(Kłog rłog n) auxiliary memory. Our algorithm requires O(nłog r) work and O((n/K+łog K)łog r) span, making it work-efficient and highly parallel. In addition, we present several optimizations that significantly improve the empirical performance of our algorithm. We compare the performance of Regions Sort to existing parallel in-place and out-of-place sorting algorithms on a variety of input distributions and show that Regions Sort is faster than optimized out-of-place radix sorting and comparison sorting algorithms, and is almost always faster than the fastest publicly-available in-place sorting algorithm.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信
小红书