Run details:
Mozilla/5.0 (iPhone; CPU iPhone OS 17_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) EdgiOS/125.0.2535.96 Version/17.0 Mobile/15E148 Safari/604.1
Mobile Safari 17
iOS 17.5
Mobile
10 months ago
Test name Executions per second
Intl.NumberFormat 46464.3 Ops/sec
toLocalString 23746416.0 Ops/sec
Tests:
  • Intl.NumberFormat

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

     
    var a = "10000".toLocaleString("en-US");