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
2 years ago
(Math.round(*10000)/10000).toString()
295K/s
toFixed(4)
279K/s
toPrecision(4).toString()
264K/s
View exact numbers
Test name Executions per second
(Math.round(*10000)/10000).toString() 295,304 Ops/sec
toFixed(4) 279,439 Ops/sec
toPrecision(4).toString() 264,386 Ops/sec
Script Preparation code:
Tests: