Script Preparation code:
AخA
 
var formatter = new Intl.NumberFormat("en-US");
Tests:
  • Intl.NumberFormat

     
    var a = new Intl.NumberFormat("en-US").format("10000");
  • toLocalString

     
    var a = "10000".toLocaleString("en-US");
  • Intl.NumberFormat With cached formatter

     
    var a = formatter.format("10000");
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Intl.NumberFormat
    toLocalString
    Intl.NumberFormat With cached formatter

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one month ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 YaBrowser/25.2.0.0 Safari/537.36
Yandex Browser 25 on Mac OS X 10.15.7
View result in a separate tab
Test name Executions per second
Intl.NumberFormat 85244.9 Ops/sec
toLocalString 34586104.0 Ops/sec
Intl.NumberFormat With cached formatter 4185153.8 Ops/sec