Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.1 Safari/605.1.15
Safari 17
Mac OS X 10.15.7
Desktop
2 years ago
JavaScript Date Time format
4.2M/s
JavaScript Date Time format using Template Strings.
2.0M/s
Date().toLocaleString()
4K/s
Intl.DateTimeFormat()
3K/s
View exact numbers
| Test name |
Executions per second |
|
✓
JavaScript Date Time format
|
4,228,993 Ops/sec |
|
JavaScript Date Time format using Template Strings.
|
1,963,978 Ops/sec |
|
new Date()
|
1,289,038 Ops/sec |
|
Date().toLocaleString()
|
3,613 Ops/sec |
|
Intl.DateTimeFormat()
|
3,484 Ops/sec |
Tests:
-
new Date()
-
Intl.DateTimeFormat()
-
Date().toLocaleString()
-
JavaScript Date Time format
-
JavaScript Date Time format using Template Strings.