by rurban · 6y ago · 0 comments
Modern PRNG's can be tested with Dieharder, TestU01 or STS and benchmarked. This article only talks about primitive old LCG's (not any good one) or MT.
Even a truncated 128-bit LCG has far better properties.
See https://www.pcg-random.org/index.html
The homepage might come across as a a little overzealous (for example ChaCha quality listed as good rather than excellent), but generally has good points.
They recommend to use their xoshiro PRNG.
https://www.reddit.com/r/programming/comments/8jbkgy/the_wra...
And the PCG author's response: https://www.pcg-random.org/posts/on-vignas-pcg-critique.html
For example, for one of his arguments, he specifically chose a generator called pcg32_once_insecure, which the PCG author does not recommend due to its invertible output function!
Personally, I have read both arguments in detail and I would always use PCG or even a truncated LCG over xoshiro, which has a large size in comparison, potentially worse statistical properties, and no gain- faster in some benchmarks and slower in others.
But there exist some new and very fast PRNG's which are fast and extremely good. Almost TRNG, wyrand eg.