Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:78.0) Gecko/20100101 Firefox/78.0
Firefox 78
Mac OS X 10.11
Desktop
2 months ago
Test name Executions per second
parseFloat() + toFixed(4) 2609361.0 Ops/sec
parseFloat() + toPrecision(4) 2686565.8 Ops/sec
Math.round(*10000)/10000 41705100.0 Ops/sec
Script Preparation code:
Tests:
  • parseFloat() + toFixed(4)

  • parseFloat() + toPrecision(4)

  • Math.round(*10000)/10000


;