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
831.6M/s
crypto.randomUUID
1.6M/s
crypto.getRandomValues
1.4M/s
View exact numbers
Test name
Executions per second
✓
Math.random
831,582,144 Ops/sec
crypto.randomUUID
1,619,938 Ops/sec
crypto.getRandomValues
1,449,851 Ops/sec
Script Preparation code:
var array = new Uint32Array(1)
Tests:
Math.random
Math.random()
crypto.randomUUID
crypto.randomUUID()
crypto.getRandomValues
crypto.getRandomValues(array)