Engineering Shared-Memory Parallel Shuffling to Generate Random Permutations In-Place

02/07/2023
by   Manuel Penschuck, et al.
0

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 √(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.

READ FULL TEXT

page 13

page 15

page 16

page 17

research
03/02/2020

Massively Parallel Algorithms for Distance Approximation and Spanners

Over the past decade, there has been increasing interest in distributed/...
research
08/04/2020

Bucket Oblivious Sort: An Extremely Simple Oblivious Sort

We propose a conceptually simple oblivious sort and oblivious random per...
research
03/01/2021

Parallel In-Place Algorithms: Theory and Practice

Many parallel algorithms use at least linear auxiliary space in the size...
research
03/23/2018

Parallel Range and Segment Queries with Augmented Maps

The range and segment query problems are fundamental problems in computa...
research
02/12/2021

Work-Optimal Parallel Minimum Cuts for Non-Sparse Graphs

We present the first work-optimal polylogarithmic-depth parallel algorit...
research
04/20/2018

Parallel Quicksort without Pairwise Element Exchange

Standard implementations of 2-way, parallel, distributed memory Quicksor...
research
01/31/2019

High Performance Algorithms for Counting Collisions and Pairwise Interactions

The problem of counting collisions or interactions is common in areas as...

Please sign up or login with your details

Forgot password? Click here to reset