Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Chrome 120
Mac OS X 10.15.7
Desktop
2 years ago
JavaScript Date Time format using Template Strings.
3.4M/s
JavaScript Date Time format
3.3M/s
Date().toLocaleString()
29K/s
Intl.DateTimeFormat()
29K/s
View exact numbers
| Test name |
Executions per second |
|
✓
JavaScript Date Time format using Template Strings.
|
3,362,173 Ops/sec |
|
JavaScript Date Time format
|
3,292,833 Ops/sec |
|
new Date()
|
1,520,143 Ops/sec |
|
Date().toLocaleString()
|
29,192 Ops/sec |
|
Intl.DateTimeFormat()
|
28,831 Ops/sec |
Tests:
-
new Date()
-
Intl.DateTimeFormat()
-
Date().toLocaleString()
-
JavaScript Date Time format
-
JavaScript Date Time format using Template Strings.