Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Number.toLocaleString vs Intl.NumberFormat - random numbers
(version: 1)
Comparing performance of:
Intl.NumberFormat vs Number.toLocaleString
Created:
one year ago
by:
Guest
Go to the latest result
Tests:
Intl.NumberFormat
const currencyPlayNumber = Math.random() * 10000; const translatedString = new Intl.NumberFormat(undefined, { style: 'currency', currency: 'RUB', }).format(currencyPlayNumber);
Number.toLocaleString
const currencyPlayNumber = Math.random() * 10000; 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:
one year ago
)
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/OS:
Chrome 131 on Mac OS X 10.15.7
View result in a separate tab
Embed
Embed Benchmark Result
Number.toLocaleString
56K/s
Intl.NumberFormat
55K/s
View exact numbers
Test name
Executions per second
✓
Number.toLocaleString
56,368 Ops/sec
Intl.NumberFormat
54,861 Ops/sec
Related benchmarks
Number.toLocaleString vs Intl.NumberFormat
Number.toLocaleString vs Intl.NumberFormat vs Regex
Number.toLocaleString vs Intl.NumberFormat 2
Number.toLocaleString vs Intl.NumberFormat vs Regex2515
Number.toLocaleString vs Intl.NumberFormat (single instance)
Comments
Confirm delete:
Do you really want to delete benchmark?