Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Math.random vs crypto.getRandom
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/116.0
Browser:
Firefox 116
Operating system:
Ubuntu
Device Platform:
Desktop
Date tested:
2 years ago
Math.random()
1531.4M/s
crypto.getRandomValues()
2.8M/s
View exact numbers
Test name
Executions per second
✓
Math.random()
1,531,402,240 Ops/sec
crypto.getRandomValues()
2,835,789 Ops/sec
Tests:
Math.random()
Math.random()
crypto.getRandomValues()
crypto.getRandomValues(new Uint32Array(1))[0] / 4294967296