Script Preparation code:
x
 
var formatter1 = new Intl.NumberFormat("en-US", {maximumFractionDigits: 2, minimumFractionDigits: 2});
Tests:
  • Intl.NumberFormat

     
    formatter1.format(1e6 * Math.random())
  • manual

     
    (1e6 * Math.random()).toLocaleString("en-US");
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Intl.NumberFormat
    manual

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Mobile Safari/537.36
Chrome Mobile 122 on Android
View result in a separate tab
Test name Executions per second
Intl.NumberFormat 501187.4 Ops/sec
manual 660979.8 Ops/sec