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.
翻译:将元素序列重新排列为随机顺序的过程是将元素序列重新排列为随机顺序, 使任何变异都具有同等概率。 这是几乎所有科学领域所使用的大量技术中的重要构件。 因此, 已经投入了大量的精力来设计和实施打乱算法。 我们根据我们的知识, 第一次设计了一个几乎快速、 平行的打乱算法, 以$\Ohsqrt{n ⁇ ç ⁇ log n} 来同时进行, 只需要多逻辑辅助内存。 我们在 Rust 中的引用执行是免费的, 很容易包含在其他项目中, 并且可以处理接近系统内存大小的大型数据集。 在一项经验评估中, 我们比较了我们执行过程和各种计算机结构上现有的许多解决方案。 我们的算法始终在所有机器上达到最高通过量。 此外, 我们证明平行算法的运行时间可以与其他算法从操作系统获取记忆以复制输入的时间相仿。