-
-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Ranlux support? #62
Comments
Yes, you did: rust-random/rand#1549 As hinted at there, I believe the only value of the algorithm is historical — in case one wishes to reproduce old results. This would of course be hard to do with a different random library — many of the sampling algorithms in Otherwise, you might as well just use one of our current RNGs, e.g. |
I don't think it's the industry standard anymore. If I recall correctly, it's about 10 times slower than the Mersenne Twister, which seems more popular nowadays. However, even the Mersenne Twister is slower and of less statistical quality than the state of the art (e.g the xoshiro or ChaCha RNGs). Unless you want to reproduce old results obtained with ranlux, I cannot think of a reason to use it over the alternatives we already have in Rand. |
It is for sure still the industry standard in my field! (Lattice QFT). Everyone still uses it. As far as I understand, it's much better than mersenne twister statistically. I've not seen a comparison of the statistical quality of Ranlux with e.g. PCG. I looked through the PCG paper and it's compared for speed, but in our field the quality of the RNG is much more important than the speed of the RNG (it's never the bottleneck). I wonder if there is some comparison somewhere you could point me to? If there are statistically better RNGs I'm happy to switch! :) |
CSPRNGs have higher quality requirements than MC simulations. Read this: https://en.wikipedia.org/wiki/Cryptographically_secure_pseudorandom_number_generator#Requirements To the best of my knowledge, ChaCha12 passes these security requirements (read rust-random/rand#932). ChaCha8 may also; it will certainly also suffice where security is not required. Small PRNGs like PCG and Xoshiro score well on statistical tests aside from a few issues: state may be too small to support many streams / jumps, Xoshiro can perform poorly around zero (and some other values), and bit-avalanche of seeds can be low, hence it is important not to use seeds with a low Hamming weight or multiple seeds which are similar (we provide For your application I'd recommend ChaCha8. |
Thanks for the information! |
Ranlux is the industry-standard RNG for large-scale Monte Carlo simulations. I searched but did not find any discussion about its omission or potential inclusion.
Has there been any discussion about potentially adding this (that I just didn't find)?
Would anyone be interested in a PR for this? (It sounds like a fun weekend project)
The text was updated successfully, but these errors were encountered: