-
Notifications
You must be signed in to change notification settings - Fork 2
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
[Feature request] Allow to use a faster PRNG #6
Comments
I prefer PCG. |
We'll be posting a bounty on fixing this issue, together with few additional requirements. The details are in the linked issue above. @alehander42 would be the best person to claim the bounty as the author of the library. To do this, please submit a simple pull request in our repo, bumpting the quicktest version number when the fixes are available. |
thank you, I'll continue the discussion in linked @mratsim I'll add support for a private generator, just a note, I think urandom should never block: it might produce very unrandom results with low entropy, but it still should always return valid results at least on Linux: I can easily run a million tests in 10 seconds. |
Edited my first post, "the fastest prng in Nim is stdlib random". I'll check what was taking time then, it's strange. |
Currently Quicktest uses nim-random/Random which uses the cryptographic data from /dev/urandom.
This doesn't scale, especially on servers in controlled environment (Travis, Appveyor) with no inputs/processes that serve as source of randomness.
The /dev/urandom quickly gets starved and Quicktest stalls.
I tried running millions of tests overnight, but I couldn't complete the first one:
or
-ing 2 arrays - https://github.com/status-im/nim-stint/blob/master/tests/property_based_uint256.nim#L26The fastest PRNG in Nim currently is from stdlib random which also exhibits nice randomness property is xoroshiro128+. Benchmarks: http://xoshiro.di.unimi.it/
In nim-random it's probably the XorShift128+
The text was updated successfully, but these errors were encountered: