Skip to content
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

Please consider implementing xoshiro256** (and/or xoshiro256+) #52

Open
PallHaraldsson opened this issue Jan 16, 2019 · 4 comments
Open

Comments

@PallHaraldsson
Copy link
Contributor

PallHaraldsson commented Jan 16, 2019

https://nullprogram.com/blog/2017/09/21/
"xoroshiro128+ fails PractRand very badly. [..] Since this article was published, its authors have supplanted it with xoshiro256**. It has essentially the same performance, but better statistical properties. xoshiro256** is now my preferred PRNG"

See also my JuliaLang/julia#27614 (comment) for others to possibly implement (mostly Google's Randen based on AES, the one I list here would however be my first choice) and updated top comment there.

@PallHaraldsson
Copy link
Contributor Author

PallHaraldsson commented Jan 16, 2019

I guess it would be best to implement here first; I believed we already had the best option here, thanks to you, but anyway if we had chosen, or when, could we just have copied yours to Julia's Random stdlib?

I believe legally we could (even same license). I'm not sure there's some protocol to follow. I could make a PR copying code from your package. I however do not want to take credit from you or anyone.

@PallHaraldsson PallHaraldsson changed the title xoshiro256** is missing Please consider implementing xoshiro256** (and/or xoshiro256+) Jan 16, 2019
@sunoru
Copy link
Member

sunoru commented Feb 4, 2019

I finally have time to read the interesting article and this issue. Thank you for the suggestion!

I have implemented xoshiro256** and xoshiro256+, as well as the other recommended PRNGs in their page (see sunoru@c91f948). Some deprecation warnings are also made in the code. However the docs and benchmarks may also need to be updated, and the recommended seeding function (SplitMix64) is also not fully applied yet. And it's true that BigCrush of TestU01 may not be the best choice anymore since DieHarder looks very good. Are you interested to help play around and do some test?

It is totally OK to copy this code into Random stdlib, and it's also what I wanted.

@PallHaraldsson
Copy link
Contributor Author

PallHaraldsson commented Apr 10, 2019

It seems this issue can be closed, since you implemented, thanks!

It is totally OK to copy this code into Random stdlib, and it's also what I wanted.

We've missed the 1.2 feature freeze, but I may do this, or anyone can, and closing this issue will signal the possibility of doing that at the linked Julialang issue.

@PallHaraldsson
Copy link
Contributor Author

PallHaraldsson commented Aug 14, 2019

Thanks again, FYI I just heard of Threefry supposedly fastest, and see also in comment above mine what NumPy adopted:

JuliaLang/julia#27614 (comment)

EDIT: SFC64 is faster than what NumPy choose, not sure how Threefry or other compare.

Looking for implementations I found:
https://sourceforge.net/p/pracrand/discussion/366935/thread/a7761577/
"I'm parallelizing SFC generators and trying to avoid correlation."

[and: https://github.com/maxmind/gatling-gen/blob/master/ext/PracRand/include/PractRand/RNGs/sfc64.h that doesn't seem helpful]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants