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 (X11; Ubuntu; Linux x86_64; rv:133.0) Gecko/20100101 Firefox/133.0
Browser:
Firefox 133
Operating system:
Ubuntu
Device Platform:
Desktop
Date tested:
one year ago
Math.random
1884.3M/s
crypto.randomUUID
1.3M/s
crypto.getRandomValues
818K/s
View exact numbers
Test name
Executions per second
✓
Math.random
1,884,271,744 Ops/sec
crypto.randomUUID
1,255,718 Ops/sec
crypto.getRandomValues
818,363 Ops/sec
Script Preparation code:
var array = new Uint32Array(1)
Tests:
Math.random
Math.random()
crypto.randomUUID
crypto.randomUUID()
crypto.getRandomValues
crypto.getRandomValues(array)