HTML Preparation code:
Script Preparation code:
Tests:

Historical Performance Data aggregated from 5 community runs

Desktop Results:
Firefox 5 runs
toFixed(4)
16.7M/s
toString()
11.3M/s

Fastest: toFixed(4) (1.5x faster)

View exact numbers
  • toFixed(4): 16,650,836 ops/sec
  • toString(): 11,304,220 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
    toString()
    toFixed(4)

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 7 months ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:146.0) Gecko/20100101 Firefox/146.0
Firefox 146 on Windows
View result in a separate tab
toFixed(4)
16.3M/s
toString()
9.0M/s
View exact numbers
Test name Executions per second
toFixed(4) 16,328,293 Ops/sec
toString() 8,979,583 Ops/sec