Tests:

Historical Performance Data aggregated from 39 community runs

Desktop Results:
Chrome 32 runs
Math.random
69.6M/s
Date.now
20.0M/s

Fastest: Math.random (3.5x faster)

View exact numbers
  • Math.random: 69,644,008 ops/sec
  • Date.now: 19,956,084 ops/sec
Firefox 7 runs
Math.random
1063.0M/s
Date.now
16.0M/s

Fastest: Math.random (66.4x faster)

View exact numbers
  • Math.random: 1,063,022,656 ops/sec
  • Date.now: 16,009,232 ops/sec

Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    Math.random
    Date.now

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36
Chrome 135 on Windows
View result in a separate tab
Math.random
68.8M/s
Date.now
27.9M/s
View exact numbers
Test name Executions per second
Math.random 68,750,400 Ops/sec
Date.now 27,915,438 Ops/sec