cached Intl.NumberFormat instance vs new Intl.NumberFormat vs Number.prototype.toLocaleStringFastest: cached Intl.NumberFormat instance (41.8x faster)
1,232,669 ops/sec
29,715 ops/sec
29,496 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 instance | |
| new Intl.NumberFormat | |
| Number.prototype.toLocaleString |
| Test name | Executions per second |
|---|---|
| ✓ cached Intl.NumberFormat instance | 2,781,179 Ops/sec |
| Number.prototype.toLocaleString | 33,896 Ops/sec |
| new Intl.NumberFormat | 33,546 Ops/sec |