[issue38767] Replace Mersenne Twister RNG with a PCG family algorithm

2019-11-17 Thread Tim Peters
Tim Peters added the comment: Thanks for the NumPy discussion link, Mark! Did that set a world record for an issue report's length? ;-) Not complaining - it's a very high quality and informative discussion. I'd be comfortable adopting whichever PRNGs numpy uses. numpy has better brainpow

[issue38767] Replace Mersenne Twister RNG with a PCG family algorithm

2019-11-11 Thread Mark Dickinson
Mark Dickinson added the comment: FWIW, here's the NumPy GitHub issue that led to PCG64 being chosen as the default BitGenerator. Warning: the comment thread is long (with many contributions from the PCG author). https://github.com/numpy/numpy/issues/13635 -- __

[issue38767] Replace Mersenne Twister RNG with a PCG family algorithm

2019-11-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: We had looked at this once before and the proposal was rejected (better to stick with the devil you know than than one that hasn't been extensively studied). Also, there is some value to having a large state space, shuffle() and sample() consume a lot of

[issue38767] Replace Mersenne Twister RNG with a PCG family algorithm

2019-11-11 Thread Tim Peters
Tim Peters added the comment: Python is a general-purpose language, and as such I believe it's inappropriate for it to be "a leader" in adopting new PRNGs. That's for area specialists to pioneer. If NumPy switched, that is a good reason to evaluate this again. But for backward compatibili

[issue38767] Replace Mersenne Twister RNG with a PCG family algorithm

2019-11-11 Thread Mark Dickinson
Mark Dickinson added the comment: See discussion in #30880. That issue was closed, though it's possible that it's time to reconsider. -- ___ Python tracker ___ __

[issue38767] Replace Mersenne Twister RNG with a PCG family algorithm

2019-11-11 Thread Mark Dickinson
Mark Dickinson added the comment: Also worth noting that NumPy 1.17 has now adopted PCG for their default BitGenerator. -- ___ Python tracker ___

[issue38767] Replace Mersenne Twister RNG with a PCG family algorithm

2019-11-11 Thread Tilman Roeder
New submission from Tilman Roeder : Currently, the `random.random()` function / the random module uses the Mersenne Twister algorithm for generating random numbers. While this algorithm has acceptable statistical properties for most use-cases (and does feature a ridiculously large period), it