Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36
Chrome 128
Windows
Desktop
one year ago
JavaScript Date Time format
3.2M/s
JavaScript Date Time format using Template Strings.
3.1M/s
new Date()
926K/s
Date().toLocaleString()
16K/s
Intl.DateTimeFormat()
16K/s
View exact numbers
Test name Executions per second
JavaScript Date Time format 3,155,070 Ops/sec
JavaScript Date Time format using Template Strings. 3,103,195 Ops/sec
new Date() 925,988 Ops/sec
Date().toLocaleString() 16,385 Ops/sec
Intl.DateTimeFormat() 16,050 Ops/sec
Script Preparation code:
Tests: