-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace GHC's System.Random ported implementation with SplitMix.
This is a port of "Fast Splittable Pseudorandom Number Generators" by Steele et. al. [1]. The paper's algorithm provides decent randomness for most purposes but sacrifices cryptographic-quality randomness in favor of speed. The original implementation is tested with DieHarder and BigCrush; see the paper for details. This implementation is a port from the paper, and also taking into account the SplittableRandom.java source code in OpenJDK v8u40-b25 as well as splittable_random.ml in Jane Street's standard library overlay (kernel) v113.33.03, and Random.fs in FsCheck v3, which is the initial motivation of doing this port [2] although the idea of doing this port is for having it as the default, splittable random generator in dotnet-jack [3] – QuickCheck with shrinking for free. Other than the choice of initial seed for 'ofRandomSeed' this port should be faithful. Currently, we have not rerun the DieHarder, or BigCrush tests on this implementation. 1. Guy L. Steele, Jr., Doug Lea, Christine H. Flood Fast splittable pseudorandom number generators Comm ACM, 49(10), Oct 2014, pp453-472. 2. fscheck/FsCheck#198 3. #26
- Loading branch information
1 parent
5b32001
commit ad182b1
Showing
1 changed file
with
69 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters