Script Preparation code:
Tests:
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    npm:uuid.v4()
    Math.random()
    crypto.getRandomValues()
    crypto.randomUUID()

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2 years ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.1.2 Safari/605.1.15
Safari 17 on Mac OS X 10.15.7
View result in a separate tab
crypto.randomUUID()
5.6M/s
crypto.getRandomValues()
2.1M/s
npm:uuid.v4()
1.4M/s
Math.random()
755K/s
View exact numbers
Test name Executions per second
crypto.randomUUID() 5,607,730 Ops/sec
crypto.getRandomValues() 2,089,803 Ops/sec
npm:uuid.v4() 1,425,344 Ops/sec
Math.random() 755,012 Ops/sec