Run details:
Mozilla/5.0 (Linux; Android 5.1.1; Mi-4c) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.99 Mobile Safari/537.36
Chrome Mobile 71
Android 5.1.1
Mobile
5 years ago
Test name Executions per second
toFixed(4) 846121.9 Ops/sec
toPrecision(4).toString() 744963.4 Ops/sec
(Math.round(*10000)/10000).toString() 914073.2 Ops/sec
Script Preparation code:
Tests:
  • toFixed(4)

  • toPrecision(4).toString()

  • (Math.round(*10000)/10000).toString()