-
-
Notifications
You must be signed in to change notification settings - Fork 473
Description
Hi, I noticed the new SmallRng, and while a welcome change I'm sure, I believe there's still room for improvements. I'm thinking about seedability issues specifically and in general also.
I think it's a bad idea to require, well, pretty much anything from users regarding seed distributions, especially if it's an RNG recommended for general use. Non-specialist RNGs should handle such pesky issues themselves. Users are going to pick seeds 0, 1, 2, ... To expect anything more is madness. And we should absolutely deal with that reality.
My specific suggestion at this point is to make the default seeding procedure of SmallRng idiot proof: reduce the seed size to 192 or 128 bits and hash it, like with a 64-bit seed. (The 64-bit initialization looks very good now after SplitMix64.) Because the state space is not full 256 bits, this problem can't be fixed without reducing the seed size. It depends on your perspective whether it's a real problem, but I think we have all the tools at hand to deal with seedability and improve the user experience even more in this regard.