new Date().toISOString() vs new Date().toLocaleString()Fastest: new Date().toISOString() (1.8x faster)
910,085 ops/sec
502,634 ops/sec
Fastest: new Date().toISOString() (5.9x faster)
2,334,812 ops/sec
398,924 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| new Date().toISOString() | |
| new Date().toLocaleString() |
| Test name | Executions per second |
|---|---|
| ✓ new Date().toLocaleString() | 543,276 Ops/sec |
| new Date().toISOString() | 312,041 Ops/sec |