Math.random vs crypto APIFastest: Math.random (19.3x faster)
16,030,738 ops/sec
832,086 ops/sec
Fastest: Math.random (1054.4x faster)
1,244,993,152 ops/sec
1,180,720 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| Math.random | |
| crypto API |
| Test name | Executions per second |
|---|---|
| ✓ Math.random | 65,569,552 Ops/sec |
| crypto API | 454,750 Ops/sec |