工程化共享内存并行洗牌以就地生成随机排列
Engineering Shared-Memory Parallel Shuffling to Generate Random Permutations In-Place
摘要:
混洗是将元素序列重新排列成随机顺序的过程,使得任何排列都以相等的概率发生。它是几乎所有科学领域中使用的大量技术的重要组成部分。因此,相当多的工作一直致力于洗牌算法的设计和实现。我们的工程师,-尽我们所知-第一次,一个实际上快速,并行洗牌算法与$\Oh{\sqrt{n}\log n}$并行深度,只需要多对数辅助内存。我们在Rust中的参考实现是免费提供的,很容易包含在其他项目中,并且可以处理接近系统内存大小的大型数据集。在实证评估中,我们比较了我们的实现与现有的解决方案在各种计算机体系结构。我们的算法始终在所有机器上实现最高的吞吐量。此外,我们证明了我们的并行算法的运行时间是可比的时间,其他算法可能需要从操作系统获取内存复制输入。
英文摘要:
Shuffling is the process of rearranging a sequence of elements into a random order such that any permutation occurs with equal probability. It is an important building block in a plethora of techniques used in virtually all scientific areas. Consequently considerable work has been devoted to the design and implementation of shuffling algorithms. We engineer, -- to the best of our knowledge -- for the first time, a practically fast, parallel shuffling algorithm with $\Oh{\sqrt{n}\log n}$ parallel depth that requires only poly-logarithmic auxiliary memory. Our reference implementations in Rust are freely available, easy to include in other projects, and can process large data sets approaching the size of the system's memory. In an empirical evaluation, we compare our implementations with a number of existing solutions on various computer architectures. Our algorithms consistently achieve the highest through-put on all machines. Further, we demonstrate that the runtime of our parallel algorithm is comparable to the time that other algorithms may take to acquire the memory from the operating system to copy the input.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。