Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

However, this page claims PCG is rather bad: http://pcg.di.unimi.it/pcg.php

They recommend to use their xoshiro PRNG.



That author has a history of extreme bias and almost-vindictive personal attacks on the author of PCG. See the reddit comments:

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.


Well, I had only skimmed the page

But I am using xoshiro in my projects, because I thought xor was simpler than multiplication.


Yeah, xor is simpler than multiplication in terms of hardware complexity- luckily, we have the multiplication circuits built in, so may as well take advantage of them.


Xoshiro ist only fast, nothing else. PCG has much better properties. Fast is not everything.

But there exist some new and very fast PRNG's which are fast and extremely good. Almost TRNG, wyrand eg.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: