Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Number.toLocaleString vs Intl.NumberFormat single instance
(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(undefined, { style: 'currency', currency: 'RUB', })
Tests:
Intl.NumberFormat
const currencyPlayNumber = 1; const translatedString = formatter.format(currencyPlayNumber);
Number.toLocaleString
const currencyPlayNumber = 1; const translatedString = currencyPlayNumber.toLocaleString(undefined, { style: 'currency', currency: 'RUB', })
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:
4 months ago
)
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:146.0) Gecko/20100101 Firefox/146.0
Browser/OS:
Firefox 146 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
Intl.NumberFormat
7059031.0 Ops/sec
Number.toLocaleString
72299.2 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)
Number.toLocaleString vs Intl.NumberFormat - random numbers
cached Number.toLocaleString vs Intl.NumberFormat vs Regex
Comments
Confirm delete:
Do you really want to delete benchmark?