5 ms·
Xoroshiro is faster than the entire PCG family and more theoretically grounded. I don't see any reason you would ever use it.
by searealist 3y ago
Xoroshiro is faster than the entire PCG family and more theoretically grounded. I don't see any reason you would ever use it.
- jdiff 3y agoI'm no PRNG expert but xoroshiro seems to fail a lot of statistical tests. It might be faster but it seems to be very deeply flawed.
- searealist 3y agoWhich statistical tests does it fail?
- omoikane 3y agoPerhaps this is what you were looking for: https://www.pcg-random.org/posts/xoshiro-repeat-flaws.html https://www.pcg-random.org/posts/xoshiro-repeat-flaws.html
- searealist 3y agoThis is not a statistical flaw.
- defrost 3y agoIt's not a failure of a standard statistical test, no. But it is, in the words of David Blackman, one of the coauthors of Xoshiro256: “quite clearly a departure from random behaviour” * Xoshiro256's large state space means it is too big to fail any statistical tests that look for close repeats. * The issues shown in this post reveal that (as has happened numerous times in the past!) although mathematical theory can often show specific flaws, there are no known mathematical techniques to show that a PRNG scheme is actually good. As things currently stand, a new analysis can always reveal a flaw not accounted for by prior theory. In this case, a mix of practice and theory has shown that the structure of Xoshiro's state space is poorer than that of many competing generation schemes, ... Whether the issue of close repeats is serious or not ultimately depends upon the nature of the use to which the generator is put ... some applications might not fairly model a natural outcome because of this.
- searealist 3y agoIt's a property that every single LFSR has, and it is not considered a flaw.
- FabHK 3y agoThat’s by no means consensus, it seems to me. Both families of PCRG are very good and have occasional flaws, I’d say. An earlier comment of mine links to some of the debate: https://news.ycombinator.com/item?id=36134100 https://news.ycombinator.com/item?id=36134100
- FabHK 3y agoPRNG, should stop posting while asleep
- omoikane 3y agoRelated: https://www.pcg-random.org/posts/on-vignas-pcg-critique.html https://www.pcg-random.org/posts/on-vignas-pcg-critique.html via: https://news.ycombinator.com/item?id=29610472 https://news.ycombinator.com/item?id=29610472 Also, Xoshiro was created in 2018, while PCG64 DXSM was made in 2019 and appears to have addressed various shortcomings. https://github.com/numpy/numpy/issues/13635#issuecomment-506088698 https://github.com/numpy/numpy/issues/13635#issuecomment-506...
- searealist 3y agoPCG64-DXSM comes in at 0.50 CPB Every variant of xoroshiro is faster than this. The fastest variant is 0.27 CPB. PCG is really slow and not novel at all.
- Vecr 3y agoAt this point people should probably consider something like ChaCha8 (a reduced round version of ChaCha20) as a random number generator as a first choice, and only using else if ChaCha8 is too slow. It gets around the whole PCG vs Xoroshiro debate and it's just better in general.
- eternityforest 3y agoWhat about AES in CTR mode? Is the HW acceleration enough to make that faster? Or could you just only use one round of it or something to speed it up and make use of the hardware?