Run details:
Mozilla/5.0 (Linux; Android 10; SM-G970F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Mobile Safari/537.36
Chrome Mobile 105
Android
Mobile
2 years ago
Test name Executions per second
parseFloat() + toFixed(4) 728563.3 Ops/sec
parseFloat() + toPrecision(4) 734518.8 Ops/sec
Math.round(*10000)/10000 1415770.8 Ops/sec
Script Preparation code:
Tests:
  • parseFloat() + toFixed(4)

  • parseFloat() + toPrecision(4)

  • Math.round(*10000)/10000