cached Intl.NumberFormat vs new Intl.NumberFormat vs toLocaleStringFastest: cached Intl.NumberFormat (55.6x faster)
46,727 ops/sec
850 ops/sec
841 ops/sec
Fastest: cached Intl.NumberFormat (46.8x faster)
36,214 ops/sec
806 ops/sec
773 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| cached Intl.NumberFormat | |
| new Intl.NumberFormat | |
| toLocaleString |
| Test name | Executions per second |
|---|---|
| ✓ cached Intl.NumberFormat | 40,622 Ops/sec |
| toLocaleString | 891 Ops/sec |
| new Intl.NumberFormat | 853 Ops/sec |