Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Intl.NumberFormat vs toLocalString-
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:133.0) Gecko/20100101 Firefox/133.0
Browser:
Firefox 133
Operating system:
Ubuntu
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
toLocaleString
61690.5 Ops/sec
Intl.NumberFormat
3002642.8 Ops/sec
Script Preparation code:
var target = 123456789.123456789 var options = {minimumFractionDigits: 3, maximumFractionDigits: 3} var num var intlformat = new Intl.NumberFormat('en-US', options)
Tests:
toLocaleString
var a = target.toLocaleString('en-US', options);
Intl.NumberFormat
var a = intlformat.format(target)