Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36
Chrome 123
Linux
Desktop
2 years ago
JavaScript Date Time format
2.4M/s
JavaScript Date Time format using Template Strings.
2.3M/s
Date().toLocaleString()
22K/s
Intl.DateTimeFormat()
21K/s
View exact numbers
| Test name |
Executions per second |
|
✓
JavaScript Date Time format
|
2,402,433 Ops/sec |
|
JavaScript Date Time format using Template Strings.
|
2,324,169 Ops/sec |
|
new Date()
|
1,126,642 Ops/sec |
|
Date().toLocaleString()
|
22,165 Ops/sec |
|
Intl.DateTimeFormat()
|
20,814 Ops/sec |
Tests:
-
new Date()
-
Intl.DateTimeFormat()
-
Date().toLocaleString()
-
JavaScript Date Time format
-
JavaScript Date Time format using Template Strings.