Script Preparation code:
Tests:

Historical Performance Data aggregated from 8 community runs

Desktop Results:
Chrome 8 runs
cached Intl.NumberFormat instance
1.2M/s
Number.prototype.toLocaleString
30K/s
new Intl.NumberFormat
29K/s

Fastest: cached Intl.NumberFormat instance (41.8x faster)

View exact numbers
  • cached Intl.NumberFormat instance: 1,232,669 ops/sec
  • Number.prototype.toLocaleString: 29,715 ops/sec
  • new Intl.NumberFormat: 29,496 ops/sec

Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    cached Intl.NumberFormat instance
    new Intl.NumberFormat
    Number.prototype.toLocaleString

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 9 months ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0.1 Safari/605.1.15
Safari 26 on Mac OS X 10.15.7
View result in a separate tab
cached Intl.NumberFormat instance
2.8M/s
Number.prototype.toLocaleString
34K/s
new Intl.NumberFormat
34K/s
View exact numbers
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