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

implement xoshiro256++ #9298

Merged
merged 2 commits into from
Jul 4, 2021
Merged

implement xoshiro256++ #9298

merged 2 commits into from
Jul 4, 2021

Conversation

leesongun
Copy link
Contributor

@leesongun leesongun commented Jul 4, 2021

This PR adds xoshiro256++ PRNG to std.rand. The reason for the choice is the following.

  1. Xoshiro256 series have larger state space than the xoroshiro128 series and also faster when both are vectorized. Also, when they aren't vectorized, both speeds are similar.
  2. ++ and ** variants are free from linear complexity concerns of + variants, which makes them suitable as the default PRNG.
  3. It seems the author recommends xoshiro256++ over xoshiro256**, and its vectorized performance is more thoroughly tested compared to the ** variant.

@leesongun leesongun marked this pull request as ready for review July 4, 2021 04:52
@jedisct1
Copy link
Contributor

jedisct1 commented Jul 4, 2021

Alright, let's get this in.

Having a replacement for Xoroshiro128+ in 0.9 is definitely a good idea.

@jedisct1 jedisct1 merged commit da2ca44 into ziglang:master Jul 4, 2021
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

Successfully merging this pull request may close these issues.

2 participants