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

switch to XoShiRo256++ random #2747

Merged
merged 3 commits into from
Mar 1, 2025
Merged

switch to XoShiRo256++ random #2747

merged 3 commits into from
Mar 1, 2025

Conversation

TechLord22
Copy link
Member

What

Switches from XSTR to XoShiRo256++ as the random generator implementation used by GT.

In testing, 256++ was found to be effectively equal or better in terms of speed, and most likely also has better randomness.

Implementation Details

SplitMix64 is used to generate the 256 bits of state for 256++, it should not be used for actual random number generation.
XoRoShiRo128+ is used to generate random seeds for other PRNG implementations when created without an initial seed. It is not exposed elsewhere, and should not be used for any other purpose.

@TechLord22 TechLord22 requested a review from a team as a code owner March 1, 2025 21:43
@TechLord22 TechLord22 added the type: refactor Suggestion to refactor a section of code label Mar 1, 2025
@TechLord22 TechLord22 merged commit 9400705 into master Mar 1, 2025
3 checks passed
@TechLord22 TechLord22 deleted the tc/rng branch March 1, 2025 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: refactor Suggestion to refactor a section of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants