Run details:
Mozilla/5.0 (Linux; Android 7.0; MI 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.64 Mobile Safari/537.36
Chrome Mobile 70
Android 7.0
Mobile
6 years ago
Test name Executions per second
toFixed(4) 811385.8 Ops/sec
toPrecision(4).toString() 750512.9 Ops/sec
(Math.round(*10000)/10000).toString() 1036484.4 Ops/sec
Script Preparation code:
Tests:
  • toFixed(4)

  • toPrecision(4).toString()

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