Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Number.toLocaleString vs Intl.NumberFormat 3
(version: 1)
Comparing performance of:
Intl.NumberFormat vs Number.toLocaleString vs new Intl.NumberFormat
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 = new Intl.NumberFormat(undefined, { style: 'currency', currency: 'RUB', }).format(currencyPlayNumber);
Number.toLocaleString
const currencyPlayNumber = 1; const translatedString = currencyPlayNumber.toLocaleString(undefined, { style: 'currency', currency: 'RUB', })
new Intl.NumberFormat
const currencyPlayNumber = 1; const translatedString = formatter.format(currencyPlayNumber);
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (3)
Previous results
Fork
Test case name
Result
Intl.NumberFormat
Number.toLocaleString
new Intl.NumberFormat
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Comments
Confirm delete:
Do you really want to delete benchmark?