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

Explore the possibility to leverage JEP 356 to enhance the randomization process #457

Open
fmbenhassine opened this issue Mar 20, 2021 · 0 comments
Milestone

Comments

@fmbenhassine
Copy link
Member

In JEP 356, Java 17 will probably introduce some interesting enhancements to the Pseudo-Random Number Generation capabilities in the standard library. I'm thinking of the new RandomGenerator interface and how it can make PRNG algorithms interchangeable:

We provide a new interface, RandomGenerator, which supplies a uniform API for all existing and new PRNGs.
RandomGenerators provide methods named ints, longs, doubles, nextBoolean, nextInt, nextLong, nextDouble,
and nextFloat, with all their current parameter variations.
[..]
We also provide implementations of these widely-used PRNG algorithms:
* Xoshiro256PlusPlus
* Xoroshiro128PlusPlus

Another improvement from which Easy Random could benefit directly is the following:

The structure of the central nextLong (or nextInt) method of an LXM algorithm follows a suggestion
in December 2017 by Sebastiano Vigna that using one LCG subgenerator and one xor-based subgenerator
(rather than two LCG subgenerators) would provide a longer period,  superior equidistribution, scalability,
and better quality.

This issue is to explore if Easy Random can benefit from these enhancements.

@fmbenhassine fmbenhassine added this to the 6.0.0 milestone Jul 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant