You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Daniel Lemire published a paper and Melissa O'Neil wrote a blog post about efficient range sampling, including some benchmarks on shuffling performance. This might be of interest for Rand.
The text was updated successfully, but these errors were encountered:
Just reading the article, we are doing ok already. We use the unbiased multiply method, where the cost of the modulus can be amortized. Or we use the bitmasking method on some integer sizes with sample_single, which may be a bit faster than taking the modulus.
Biased methods are still worth exposing somehow I think.
It would be interesting to see a straight-up comparison between this and the method @pitdicker implemented, which is similar to Lemire's but uses a different technique to avoid modulo computation. Perhaps @imneme would like to compare?
Daniel Lemire published a paper and Melissa O'Neil wrote a blog post about efficient range sampling, including some benchmarks on shuffling performance. This might be of interest for Rand.
The text was updated successfully, but these errors were encountered: