Skip to content

Instantly share code, notes, and snippets.

@envp
Created March 19, 2016 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save envp/2c06e87ee1f0d9cd0a05 to your computer and use it in GitHub Desktop.
Save envp/2c06e87ee1f0d9cd0a05 to your computer and use it in GitHub Desktop.
It gets slower after running a few times and starts with comparable perf to Random.new_seed
dimsum:~/workspace/benchmarks $ ruby new_seed_bench.rb
Random.new_seed
128612292610189266596556422956211714817
6.2686e-05
PCGRandom.new_seed
12346887968840078306103323986432
6.4614e-05
dimsum:~/workspace/benchmarks $ ruby new_seed_bench.rb
Random.new_seed
218468435883139448544708591128323365688
7.9909e-05
PCGRandom.new_seed
5673377140978196123128157513728
9.1e-05
dimsum:~/workspace/benchmarks $ ruby new_seed_bench.rb
Random.new_seed
208114029717555511997444579502515870770
6.1468e-05
PCGRandom.new_seed
1448630814480023084077368872704
5.6057e-05
dimsum:~/workspace/benchmarks $ ruby new_seed_bench.rb
Random.new_seed
264969327542959910529797192357971139592
8.5737e-05
PCGRandom.new_seed
14572513409942016
0.047181104
dimsum:~/workspace/benchmarks $ ruby new_seed_bench.rb
Random.new_seed
100208120091426586481931054665690393762
7.107e-05
PCGRandom.new_seed
63179226355577088
12.364562643
dimsum:~/workspace/benchmarks $ ruby new_seed_bench.rb
Random.new_seed
147874755848692167339400263338143179590
8.1753e-05
PCGRandom.new_seed
62453866857356288
7.963510475
dimsum:~/workspace/benchmarks $ ruby new_seed_bench.rb
Random.new_seed
22236902006317010338321622184197164981
0.00010332
PCGRandom.new_seed
50375095226001857078259520943903459528192
8.5965e-05
dimsum:~/workspace/benchmarks $ ruby new_seed_bench.rb
Random.new_seed
117464144075601389797094690244337336926
7.6902e-05
PCGRandom.new_seed
33850191599053859431796783651707244973056
7.8336e-05
dimsum:~/workspace/benchmarks $ ruby new_seed_bench.rb
Random.new_seed
145958485435948998732567950152378538056
7.9591e-05
PCGRandom.new_seed
28951732413753479660000729229668319159296
6.9942e-05
dimsum:~/workspace/benchmarks $ ruby new_seed_bench.rb
Random.new_seed
38806632042491148242922175055677715925
6.1739e-05
PCGRandom.new_seed
44393954789090939092641311152227027402240
6.396e-05
dimsum:~/workspace/benchmarks $ ruby new_seed_bench.rb
Random.new_seed
215455803124429948216184547396838051123
5.8845e-05
PCGRandom.new_seed
832470521589847412906650289985163264
7.5239e-05
dimsum:~/workspace/benchmarks $ ruby new_seed_bench.rb
Random.new_seed
301536075300302287337025253224081679301
8.1106e-05
PCGRandom.new_seed
5618506328606534083584983770368
8.6288e-05
dimsum:~/workspace/benchmarks $ ruby new_seed_bench.rb
Random.new_seed
89609852271110750342238629649225656428
0.00011753
PCGRandom.new_seed
16708922959406417295236788265984
0.025398213
dimsum:~/workspace/benchmarks $ ruby new_seed_bench.rb
Random.new_seed
27661138527292546147359637767364749140
6.1849e-05
PCGRandom.new_seed
17793078911089227736974405050880
7.7099e-05
dimsum:~/workspace/benchmarks $ ruby new_seed_bench.rb
Random.new_seed
182770497978593026883592708271346769342
9.6837e-05
PCGRandom.new_seed
20506156679293952
1.837349191
dimsum:~/workspace/benchmarks $ ruby new_seed_bench.rb
Random.new_seed
223368830270670561884333947991412102743
9.0963e-05
PCGRandom.new_seed
71684122730835968
11.213495301
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment