Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36
Chrome 125
Mac OS X 10.15.7
Desktop
2 years ago
JavaScript Date Time format
3.1M/s
JavaScript Date Time format using Template Strings.
3.0M/s
Intl.DateTimeFormat()
22K/s
Date().toLocaleString()
20K/s
View exact numbers
| Test name |
Executions per second |
|
✓
JavaScript Date Time format
|
3,060,196 Ops/sec |
|
JavaScript Date Time format using Template Strings.
|
3,024,269 Ops/sec |
|
new Date()
|
1,748,789 Ops/sec |
|
Intl.DateTimeFormat()
|
22,018 Ops/sec |
|
Date().toLocaleString()
|
20,353 Ops/sec |
Tests:
-
new Date()
-
Intl.DateTimeFormat()
-
Date().toLocaleString()
-
JavaScript Date Time format
-
JavaScript Date Time format using Template Strings.