npm:uuid.v4() vs Math.random() vs crypto.getRandomValues() vs crypto.randomUUID()| Test case name | Result |
|---|---|
| npm:uuid.v4() | |
| Math.random() | |
| crypto.getRandomValues() | |
| crypto.randomUUID() |
| 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 |