Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
DateTimeFormat vs toLocaleString
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Browser:
Chrome 131
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
DateTimeFormat single
26269.6 Ops/sec
toLocaleString single
26848.9 Ops/sec
DateTimeFormat 100
264.6 Ops/sec
toLocaleString 100
269.0 Ops/sec
DateTimeFormat 10000
2.7 Ops/sec
toLocaleString 10000
2.7 Ops/sec
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
/*your preparation JavaScript code goes here */ var options = { year: 'numeric', month: 'numeric', day: 'numeric', hour: 'numeric', minute: 'numeric', second: 'numeric', hour12: false, fractionalSecondDigits: 3, }
Tests:
DateTimeFormat single
new Intl.DateTimeFormat('de-DE', options).format(new Date())
toLocaleString single
new Date().toLocaleString('de-DE', options)
DateTimeFormat 100
[...Array(100)].forEach((_, i) => new Intl.DateTimeFormat('de-DE', options).format(new Date()))
toLocaleString 100
[...Array(100)].forEach((_, i) => new Date().toLocaleString('de-DE', options))
DateTimeFormat 10000
[...Array(10000)].forEach((_, i) => new Intl.DateTimeFormat('de-DE', options).format(new Date()))
toLocaleString 10000
[...Array(10000)].forEach((_, i) => new Date().toLocaleString('de-DE', options))