Run details:
Mozilla/5.0 (Linux; Android 10; SAMSUNG SM-J810G) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/16.0 Chrome/92.0.4515.166 Mobile Safari/537.36
Chrome Mobile 92
Android
Mobile
5 months ago
Test name Executions per second
toFixed(4) 279438.6 Ops/sec
toPrecision(4).toString() 264386.0 Ops/sec
(Math.round(*10000)/10000).toString() 295304.3 Ops/sec
Script Preparation code:
Tests:
  • toFixed(4)

  • toPrecision(4).toString()

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