PRNG comparison (v5)

Revision 5 of this benchmark created on


Preparation HTML

<script src="https://gist.github.com/kirbysayshi/1342599/raw/cd146576d84133ef260dca195804865e37da90ba/alea.js"></script>
<script src="https://gist.github.com/kirbysayshi/1342599/raw/76b04861a56ad22b076cf39a12fe4c91614615d7/kiss07.js"></script>
<script src="https://gist.github.com/kirbysayshi/1342599/raw/b832b0e522e72de0a932e2f4567e31336ceeec84/kybos.js"></script>
<script src="https://gist.github.com/kirbysayshi/1342599/raw/b3997929765c9f8bca5281bc0d32a753b2738eb5/lfib.js"></script>
<script src="https://gist.github.com/kirbysayshi/1342599/raw/a4a5a532601ad511a9841ab0ec60448dae4fd7c1/lfib4.js"></script>
<script src="https://gist.github.com/kirbysayshi/1342599/raw/5c6667bb9aca9228836eae19d0684647bbdc65c5/mash.js"></script>
<script src="https://gist.github.com/kirbysayshi/1342599/raw/f104ec805a7a1221fff055e6b7daaa452f86eda6/mrg32k3a.js"></script>
<script src="https://gist.github.com/kirbysayshi/1342599/raw/3a54bf50924a53154f99370e343feeddad2b601b/xorshift03.js"></script>

<script src="https://raw.github.com/chr15m/jsGameSoup/master/js/random.js"></script>

<script src="https://gist.github.com/banksean/300494/raw/f003af3e59a164330da573202f2372b94eb8ae47/mersenne-twister.js"></script>

Setup

var seed = +new Date(),
    aleaGen = Alea(seed),
    kiss07Gen = KISS07(seed),
    kybosGen = Kybos(seed),
    lfibGen = LFib(seed),
    lfib4Gen = LFIB4(seed),
    mrg32k3aGen = MRG32k3a(seed),
    xorshift3Gen = Xorshift03(seed),
    seedableRandomGen = new SeedableRandom(),
    mersenneTwisterGen = new MersenneTwister()
    
    
    seedableRandomGen.seed(seed);

Test runner

Ready to run.

Testing in
TestOps/sec
alea
aleaGen();
ready
KISS07
kiss07Gen()
ready
Kybos
kybosGen()
ready
LFib
lfibGen()
ready
LFIB4
lfib4Gen()
ready
MRG32k3a
mrg32k3aGen()
ready
Xorshift3
xorshift3Gen()
ready
SeedableRandom
seedableRandomGen.next()
ready
MersenneTwister
mersenneTwisterGen.random()
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.