Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36
Chrome 126
Windows
Desktop
2 years ago
JavaScript Date Time format
5.1M/s
JavaScript Date Time format using Template Strings.
5.1M/s
Date().toLocaleString()
30K/s
Intl.DateTimeFormat()
28K/s
View exact numbers
| Test name |
Executions per second |
|
✓
JavaScript Date Time format
|
5,072,951 Ops/sec |
|
JavaScript Date Time format using Template Strings.
|
5,069,736 Ops/sec |
|
new Date()
|
1,519,056 Ops/sec |
|
Date().toLocaleString()
|
29,783 Ops/sec |
|
Intl.DateTimeFormat()
|
27,535 Ops/sec |
Tests:
-
new Date()
-
Intl.DateTimeFormat()
-
Date().toLocaleString()
-
JavaScript Date Time format
-
JavaScript Date Time format using Template Strings.