3 ms·
Yes, although it doesn't necessarily have to be "a lot". E.g., if you want random values between 1 and 1,000,000 that takes ~20 bits of entropy, but if you use
by BeeOnRope 6y ago
Yes, although it doesn't necessarily have to be "a lot".
E.g., if you want random values between 1 and 1,000,000 that takes ~20 bits of entropy, but if you use 25 bits and Lemire's technique you'll be running at almost full speed because of the 5 extra bits (you fall into the slow case about 3% of the time).