Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:129.0) Gecko/20100101 Firefox/129.0
Firefox 129
Mac OS X 10.15
Desktop
one year ago
(Math.round(*10000)/10000).toString()
945.6M/s
toFixed(4)
19.1M/s
toPrecision(4).toString()
12.4M/s
View exact numbers
Test name Executions per second
(Math.round(*10000)/10000).toString() 945,572,032 Ops/sec
toFixed(4) 19,059,074 Ops/sec
toPrecision(4).toString() 12,396,899 Ops/sec
Script Preparation code:
Tests: