4 ms·
Compared to what? Taking rand()%n? Of course they're usually slower than that, because they provide better quality distribution of random numbers.
by tpolzer 6y ago
Compared to what? Taking rand()%n? Of course they're usually slower than that, because they provide better quality distribution of random numbers.
- ur-whale 6y ago>Compared to what? Look at the "Conclusion" section of this article: https://www.pcg-random.org/posts/bounded-rands.html https://www.pcg-random.org/posts/bounded-rands.html