HTML Preparation code:
Script Preparation code:
Tests:

Historical Performance Data aggregated from 29 community runs

Desktop Results:
Chrome 29 runs
Round floating number using toFixed()
14K/s
Round floating number using lodash round function
14K/s
View exact numbers
  • Round floating number using toFixed(): 14,305 ops/sec
  • Round floating number using lodash round function: 13,779 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
    Round floating number using lodash round function
    Round floating number using toFixed()

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 10 months ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36 Edg/140.0.0.0
Chrome 140 on Windows
View result in a separate tab
Round floating number using toFixed()
259K/s
Round floating number using lodash round function
197K/s
View exact numbers
Test name Executions per second
Round floating number using toFixed() 258,964 Ops/sec
Round floating number using lodash round function 197,272 Ops/sec