Run details:
Mozilla/5.0 (Linux; Android 13; Pixel 4a) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Mobile Safari/537.36
Chrome Mobile 112
Android
Mobile
one year ago
Test name Executions per second
Round floating number using lodash round function 453.5 Ops/sec
Round floating number using toFixed() 1657.2 Ops/sec
Round floating number using toFixed() and parseFloat 809.7 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • Round floating number using lodash round function

  • Round floating number using toFixed()

  • Round floating number using toFixed() and parseFloat