Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36
Chrome 124
Mac OS X 10.15.7
Desktop
2 years ago
JavaScript Date Time format using Template Strings.
4.1M/s
JavaScript Date Time format
4.1M/s
Date().toLocaleString()
40K/s
Intl.DateTimeFormat()
40K/s
View exact numbers
| Test name |
Executions per second |
|
✓
JavaScript Date Time format using Template Strings.
|
4,111,526 Ops/sec |
|
JavaScript Date Time format
|
4,095,166 Ops/sec |
|
new Date()
|
1,997,146 Ops/sec |
|
Date().toLocaleString()
|
39,730 Ops/sec |
|
Intl.DateTimeFormat()
|
39,531 Ops/sec |
Tests:
-
new Date()
-
Intl.DateTimeFormat()
-
Date().toLocaleString()
-
JavaScript Date Time format
-
JavaScript Date Time format using Template Strings.