Efficient Random Sampling - Parallel, Vectorized, Cache-Efficient, and Online

10/17/2016
by   Peter Sanders, et al.
0

We consider the problem of sampling n numbers from the range {1,...,N} without replacement on modern architectures. The main result is a simple divide-and-conquer scheme that makes sequential algorithms more cache efficient and leads to a parallel algorithm running in expected time O(n/p+ p) on p processors. The amount of communication between the processors is very small and independent of the sample size. We also discuss modifications needed for load balancing, reservoir sampling, online sampling, sampling with replacement, Bernoulli sampling, and vectorization on SIMD units or GPUs.

READ FULL TEXT

Please sign up or login with your details

Forgot password? Click here to reset