Run details:
Mozilla/5.0 (Linux; Android 9; moto e(6) plus) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.101 Mobile Safari/537.36
Chrome Mobile 98
Android
Mobile
2 years ago
Test name Executions per second
Round floating number using lodash round function 149.0 Ops/sec
Round floating number using toFixed() 618.6 Ops/sec
Round floating number using toFixed() and parseFloat 322.5 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