-
-
Notifications
You must be signed in to change notification settings - Fork 434
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
Adding more non-cryptographic prngs to the crate #1109
Comments
What is the motivation for having so many non-crypto RNGs? If you want, you can already publish a crate with additional RNGs. Xoshiro256** is available in |
Different prngs have differing statistical behaviors depending on the Monte-Carlo experiment; different prngs might become more favorable than others (for physical simulation, etc.). My thought was that this crate is the central random number crate in the Rust ecosystem. I thought it would make sense to have these algorithmic implementations in this crate. Unfortunately, I do not have the mental bandwidth to maintain my own crate (grad school). Ahh, I didn't know that Xoshiro256** was already available in Rust. |
Isn't it Xoshiro256++? Oh huh. rand/src/rngs/xoshiro256plusplus.rs Line 14 in 9555338
rand/src/rngs/xoshiro256plusplus.rs Line 24 in 9555338
rand/src/rngs/xoshiro256plusplus.rs Lines 71 to 74 in 9555338
|
@TheIronBorn Xoshiro has both ++ and ** variants: see https://prng.di.unimi.it/#intro @DKenefake we do have several non-crypto PRNGs, especially Xoshiro variants. Did you see the https://github.com/rust-random/rngs repo? You might also try some crypto RNGs, especially ChaCha8 which is quite fast. Certainly there are several well-known PRNGs we don't have; you may open up issues/PRs about implementing them on the rngs repo if you like, but don't expect someone else to do all the work for you. (Though once accepted into the rngs repo we can take over maintenance — with help from the community.) |
@dhardy yes but that |
Ahh, I didn't see that! For most of my use cases, cryptographic prngs are not fast enough. I was only asked if there was an appetite for a port and not others to do the port. I didn't want to go thru the trouble of porting and then it not be accepted. What I was asking here was which of these prngs would be wanted. |
Sorry, I seem to have developed a habit for skim-reading posts! If you're interested, we did some of our own investigations into small PRNGs:
So adding JSF and SFC might be nice. Note that we also have a couple of PCG generators implemented: https://docs.rs/rand_pcg/0.3.0/rand_pcg/ |
Background
What is your motivation?
I want there to be greater availability of standard prngs available in the Rust ecosystem.
What type of application is this? (E.g., cryptography, game, numerical simulation)
Monte-Carlo simulations and general use.
Feature request
The addition of additional non-cryptographic prngs to the crate. I have a small c++ prng lib that implements several generators (with validated implementations via big crush) that I think would be simple to port to this crate. Please let me know if there is an appetite for this development, as I could do (the majority) of the porting.
The prngs I am thinking are the following.
General Xorshift Family
Middle Square Algos
Other Generators
The text was updated successfully, but these errors were encountered: