Live data from Hacker News

It is high time we let go of the Mersenne Twister (2019)

arxiv.org

51–56 of 56 posts

Re: It is high time we let go of the Mersenne Twister (2019)

#52
post #5

There has been a long discussion about the respective merits of modern replacements for the twister, such as PCG [1][2][3] IMO, for monte-carlo type stuff (like your path tracer), PCG is good enough. Here's another discussion: https://stats.stackexchange.com/questions/337927/is-pcg-rand... [1] https://prng.di.unimi.it/ [2] https://www.pcg-random.org/posts/on-vignas-pcg-critique.html [3] https://www.johndcook.com/blog…

I suppose the question is do you really need to get rid of the Mersenne-Twister? Most of the modern variants are good enough for most practical purposes.

https://chasethedevil.github.io/post/war-of-the-random-numbe...

Re: It is high time we let go of the Mersenne Twister (2019)

#53
This is an interesting paper, but it has been posted to hacker news in 2020 already: https://news.ycombinator.com/item?id=25166095

I had written about it around that time on my blog, for the curious: https://chasethedevil.github.io/post/war-of-the-random-numbe... and the sequel https://chasethedevil.github.io/post/more-on-random-number-g...

A neat remark from the above: Monte-Carlo simulations run at the Los Alamos National Laboratory relied on a relatively simple linear congruential generator (LCG) producing 24- or 48-bits integers for at least 40 years

Re: It is high time we let go of the Mersenne Twister (2019)

#54

Earlier quoted context omitted.

I would take that with a pinch of salt. The PCG and Xoshiro guys seem to have some kind of feud so some of the criticisms might not be as big a problem as they are made out to be in practice. Here's a partial rebuttal: https://www.reddit.com/r/programming/comments/8gx2d3/new_lin... For a bit of "social proof" xoshiro256++ is the default PRNG is Julia.

My practical takeaway from these discussions is that for most people, in most situations, any of these modern choices are good enough for purpose - the differences (in whichever direction they lay) come in only when you're pushing the PRNG to its extremes, while operating with a specific set of constraints.

Yes the usual war between xoroshiro and pcg haters/lovers.

You could also take the opposite takeaway: don't use any of those, stay on the Mersenne-Twister (the modern variants are very reasonable).

Re: It is high time we let go of the Mersenne Twister (2019)

#55
post #32

The author of this paper suggests their xoshiro256 from the Xoshiro family[1] as an alternative. I found some discussion here[2] where it's suggested it has some fatal flaws as well, though I'm no expert. Back when I wrote a path tracer, the quality of the random number generator was visible. The poor LCG[3] that my programming language sported resulted in obvious patterns in what should have been random noise. So, f…

> I found some discussion here[2] where it's suggested it has some fatal flaws as well The described flaws are not really flaws. The author of the blog post has a strange perspective on what a PRNG should be. > obvious patterns in what should have been random noise. > So, for simulations where predictability etc is not a concern, what's the state of the art? Can't you just try different ones? E.g., try xoshiro256++,…

If performance is not as critical, I would probably pick AES or Chacha any day over those. Furthermore they make parallelizable reproducible streams trivial.

Re: It is high time we let go of the Mersenne Twister (2019)

#56
post #8

Earlier quoted context omitted.

> The author of this paper suggests their xoshiro256 from the Xoshiro family[1] as an alternative. I found some discussion here[2] where it's suggested it has some fatal flaws as well, though I'm no expert. PRNGs are complicated, and sometimes we don’t find out flaws in them until long after they are widely deployed – although test suites like U01 Big Crush and PractRand should really help that situation out. Part of…

To be fair, you should expect to learn state of the art CS in a Computational Physics class. That’s not the goal..

Shouldn’t *
Post reply on HN