Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Number.toLocaleString vs Intl.NumberFormat single instance 2
(version: 1)
Comparing performance of:
Intl.NumberFormat vs Number.toLocaleString
Created:
one year ago
by:
Guest
Jump to the latest result
Script Preparation code:
const formatter = new Intl.NumberFormat()
Tests:
Intl.NumberFormat
const currencyPlayNumber = 1; const translatedString = formatter.format(currencyPlayNumber);
Number.toLocaleString
const currencyPlayNumber = 1; const translatedString = currencyPlayNumber.toLocaleString()
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Intl.NumberFormat
Number.toLocaleString
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one month ago
)
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36 Edg/146.0.0.0
Browser/OS:
Chrome 146 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
Intl.NumberFormat
4450092.5 Ops/sec
Number.toLocaleString
150674.5 Ops/sec
Related benchmarks:
Number.toLocaleString vs Intl.NumberFormat
Number.toLocaleString vs Intl.NumberFormat vs Regex
Number.toLocaleString vs Intl.NumberFormat (prepared)
Number.toLocaleString vs Intl.NumberFormat 2
Number.toLocaleString vs Intl.NumberFormat memory pressure
Number.toLocaleString vs Intl.NumberFormat vs Regex2515
Number.toLocaleString vs Intl.NumberFormat (single instance)
cached Number.toLocaleString vs Intl.NumberFormat vs Regex
Number.toLocaleString vs Intl.NumberFormat single instance
Comments
Confirm delete:
Do you really want to delete benchmark?