Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
new Intl.DateTimeFormat vs new Date().toLocaleDateString() correct 2
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Linux x86_64; rv:132.0) Gecko/20100101 Firefox/132.0
Browser:
Firefox 132
Operating system:
Linux
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
Intl.DateTimeFormat()
3338.7 Ops/sec
Date().toLocaleString()
131.7 Ops/sec
Script Preparation code:
var options = { year: 'numeric', month: 'numeric', day: 'numeric', hour: 'numeric', minute: 'numeric', second: 'numeric', hour12: false, fractionalSecondDigits: 3, }
Tests:
Intl.DateTimeFormat()
var formatter = new Intl.DateTimeFormat('en-US', options); var date = new Date(); for(var i = 0; i < 100; i++){ formatter.format(date); }
Date().toLocaleString()
var date = new Date(); for(var i = 0; i < 100; i++){ date.toLocaleString("en-US", options) }