Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36
Chrome 119
Windows
Desktop
2 years ago
JavaScript Date Time format using Template Strings.
2.2M/s
JavaScript Date Time format
1.9M/s
new Date()
1.0M/s
Intl.DateTimeFormat()
20K/s
Date().toLocaleString()
19K/s
View exact numbers
Test name Executions per second
JavaScript Date Time format using Template Strings. 2,176,449 Ops/sec
JavaScript Date Time format 1,936,778 Ops/sec
new Date() 1,024,171 Ops/sec
Intl.DateTimeFormat() 20,279 Ops/sec
Date().toLocaleString() 18,759 Ops/sec
Script Preparation code:
Tests: