Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36
Chrome 113
Windows
Desktop
one year ago
Test name Executions per second
lodash round 4219.7 Ops/sec
lodash round 1 1127.1 Ops/sec
toFixed() 4041.6 Ops/sec
toFixed(1) 4162.0 Ops/sec
Math.round() 4860.7 Ops/sec
Math.round(1) 4793.8 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • lodash round

  • lodash round 1

  • toFixed()

  • toFixed(1)

  • Math.round()

  • Math.round(1)