Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
PRNG functions in plain JavaScript fork
(version: 0)
Comparing performance of:
sfc32 (Simple Fast Counter) vs SplitMix32 vs Mulberry32 vs xoshiro128** vs JSF (Jenkins' Small Fast) vs standart
Created:
one year ago
by:
Guest
Jump to the latest result
Script Preparation code:
var a = 1; var b = 2; var c = 3; var d = 4; var x; function sfc32(a, b, c, d) { return function() { a |= 0; b |= 0; c |= 0; d |= 0; let t = (a + b | 0) + d | 0; d = d + 1 | 0; a = b ^ b >>> 9; b = c + (c << 3) | 0; c = (c << 21 | c >>> 11); c = c + t | 0; return (t >>> 0) / 4294967296; } } function splitmix32(a) { return function() { a |= 0; a = a + 0x9e3779b9 | 0; let t = a ^ a >>> 16; t = Math.imul(t, 0x21f0aaad); t = t ^ t >>> 15; t = Math.imul(t, 0x735a2d97); return ((t = t ^ t >>> 15) >>> 0) / 4294967296; } } function mulberry32(a) { return function() { let t = a += 0x6D2B79F5; t = Math.imul(t ^ t >>> 15, t | 1); t ^= t + Math.imul(t ^ t >>> 7, t | 61); return ((t ^ t >>> 14) >>> 0) / 4294967296; } } function xoshiro128ss(a, b, c, d) { return function() { let t = b << 9, r = b * 5; r = (r << 7 | r >>> 25) * 9; c ^= a; d ^= b; b ^= c; a ^= d; c ^= t; d = d << 11 | d >>> 21; return (r >>> 0) / 4294967296; } } function jsf32(a, b, c, d) { return function() { a |= 0; b |= 0; c |= 0; d |= 0; let t = a - (b << 27 | b >>> 5) | 0; a = b ^ (c << 17 | c >>> 15); b = c + d | 0; c = d + t | 0; d = a + t | 0; return (d >>> 0) / 4294967296; } }
Tests:
sfc32 (Simple Fast Counter)
x = sfc32(a, b, c, d);
SplitMix32
x = splitmix32(a);
Mulberry32
x = mulberry32(a);
xoshiro128**
x = xoshiro128ss(a, b, c, d);
JSF (Jenkins' Small Fast)
x = jsf32(a, b, c, d);
standart
x = Math.random();
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (6)
Previous results
Fork
Test case name
Result
sfc32 (Simple Fast Counter)
SplitMix32
Mulberry32
xoshiro128**
JSF (Jenkins' Small Fast)
standart
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Comments
Confirm delete:
Do you really want to delete benchmark?