5 ms·
Xoshiro over PCG arguments: http://pcg.di.unimi.it/pcg.php http://pcg.di.unimi.it/pcg.php Response by the author: https://www.pcg-random.org/posts/on-vignas-pc
by celrod 6y ago
Xoshiro over PCG arguments:
http://pcg.di.unimi.it/pcg.php http://pcg.di.unimi.it/pcg.php
Response by the author:
https://www.pcg-random.org/posts/on-vignas-pcg-critique.html https://www.pcg-random.org/posts/on-vignas-pcg-critique.html
Personally, I use a SIMD Xoshiro256+ when I want a solid and fast RNG (although I mostly use Julia's default -- a MersenneTwister).
- BlackFly 6y agoThanks for digging this up. I was curious about exactly this.
- GolDDranks 6y agoWhy does Julia use Mersenne Twister as default? I gather that it's quite bad by modern standards?
- shele 6y agoIt _has_ a cool name, tough...
- logos01 6y agoAnd the pcg page has pretty colors
- versteegen 6y ago"quite bad" is quite an overstatement; its quality isn't a problem for many real use cases. It's quite slow compared to the likes of PCG though.
- logos01 6y agoJulia uses dSFMT, which is as fast as xoshiro on vigna own benchmark page. I would not call that slow.
- GolDDranks 6y agoRight, a bad phrasing from my part; I didn't actually mean the distribution, but more like... the bang for the buck. Why would you use slow generator as a default, if you don't even get good distribution?
- logos01 6y agoYou get a good distribution in 99.99% of the cases. There is no perfect rng. I am sure that pcg and xoroshiro also have deficiencies. The issue of good seedings is quite general.
- rurban 6y agoIt is very bad. It's is huge, 10x slower than good LCG's, and fails statistical tests, esp. it's lower bits, most wellknown by the Ferrenberg affair. https://arxiv.org/pdf/1910.06437.pdf https://arxiv.org/pdf/1910.06437.pdf PCG is also not that good. There do exist proper and fast PRNG's though. DSFMT has the same problems as MT. I'm just adding some of them to gsl and dieharder btw.
- versteegen 6y agoThank you for the reference. I stand corrected. I wasn't aware that its quality problems are that bad. What's the best argument against PCG?
- rurban 6y agoGive me a bit more time. I just added all the relevant modern RNG's to dieharder and am running all the tests. TestU01 later. Actually MT looks good enough to me now. Preliminary results at https://github.com/rurban/dieharder/blob/pcg/QUALITY.md https://github.com/rurban/dieharder/blob/pcg/QUALITY.md Re PCG: statistical weaknesses compared to the good xoshiro's or wyrand, and much slower. I'm still missing SFMT (2x faster, due to simd), and the 2 newer PCG's with a good and a fast mixer. But given the current results, there are a few new PRNG's which are so much better and faster than everything else: wyrand, xoshiro128+, xoroshiro64, xoshito128++, xoroshiro64
- aksskfngt 6y agoThis is interesting. By the way, it is noticeable that Ferrenberg himself did not find anything wrong with MT in one of his latest papers. He however mostly used MRG32k3a, and checked that MT gave similar numbers. https://arxiv.org/pdf/1806.03558 https://arxiv.org/pdf/1806.03558
- aksskfngt 6y agoIf you read that paper you referenced, the Mersenne-Twister actually ended the Ferrenberg affair. And where does it say that lower bits of dSFMT are bad? Is there proof for this statement? Now I am not saying that dSFMT is the best RNG ever, far from it. It's just very decent, and quite fast. LCGs have an awkward habit of bad projections in 2D.
- Iwan-Zotow 6y agono, it is pretty good rng, but quite slow, and world move on since 80s
- jakobnissen 6y agoI can't tell you why it was originally chosen, but there is a PR underway to have tasklocal RNG in Julia. That necessitates a smaller RNG, and we'll probably land on xoshiro256 Ref: https://github.com/JuliaLang/julia/pull/34852 https://github.com/JuliaLang/julia/pull/34852
- JoachimS 6y agoThat response by O'Neill is amazing. Solid analysis and response. Staying away from name calling, and actually getting new results and knowledge out of it all. It even ends with a thank you to Sebastiano Vigna.
- celrod 6y agoDefinitely. Once the AVX512-IFMA instruction set becomes more common (only available on Intel 10nm CPUs so far), I may try a PCG with 104 bits of state. Wanting SIMD rngs (separate generator per vector lane), PCG is hurt by 64-bit integer multiplication being on the slower side. AVX2 has to perform three 32 bit multiplications, while the AVX512 instruction has much lower throughput than the likes of a xor, shift, or floating point arithmetic. The new IFMA may change that. My use cases are Monte Carlo, where "passes statistical tests" is probably all that's needed for good results. Maybe I should just try an mcg.
- logos01 6y agoFor a view less centered on the pcg vs xoshiro world: https://chasethedevil.github.io/post/war-of-the-random-number-generators/ https://chasethedevil.github.io/post/war-of-the-random-numbe...