Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Math.random vs crypto.getRandomValues (2)
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:133.0) Gecko/20100101 Firefox/133.0
Browser:
Firefox 133
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Math.random
1795.7M/s
crypto.randomUUID
2.9M/s
crypto.getRandomValues
2.0M/s
View exact numbers
Test name
Executions per second
✓
Math.random
1,795,711,232 Ops/sec
crypto.randomUUID
2,900,291 Ops/sec
crypto.getRandomValues
1,987,381 Ops/sec
Script Preparation code:
var array = new Uint32Array(1)
Tests:
Math.random
Math.random()
crypto.randomUUID
crypto.randomUUID()
crypto.getRandomValues
crypto.getRandomValues(array)