Script Preparation code:
Tests:
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    toFixed(4)
    toPrecision(4).toString()
    (Math.round(*10000)/10000).toString()
    Math.floor fast
    precisition round

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 7 months ago)
Mozilla/5.0 (X11; Linux x86_64; rv:144.0) Gecko/20100101 Firefox/144.0
Firefox 144 on Linux
View result in a separate tab
(Math.round(*10000)/10000).toString()
787.5M/s
Math.floor fast
777.8M/s
precisition round
748.8M/s
toFixed(4)
13.4M/s
toPrecision(4).toString()
9.3M/s
View exact numbers
Test name Executions per second
(Math.round(*10000)/10000).toString() 787,530,688 Ops/sec
Math.floor fast 777,832,256 Ops/sec
precisition round 748,847,936 Ops/sec
toFixed(4) 13,354,571 Ops/sec
toPrecision(4).toString() 9,280,721 Ops/sec