Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36 Edg/133.0.0.0
Chrome 133
Mac OS X 10.15.7
Desktop
one year ago
Native toFixed(9)
40.4M/s
Native toString()
40.3M/s
bignumber.js toFixed(18)
438K/s
bignumber.js toString()
436K/s
big.js toString()
435K/s
big.js toFixed(18)
379K/s
decimal.js toString()
353K/s
decimal.js toFixed(18)
329K/s
View exact numbers
Test name Executions per second
Native toFixed(9) 40,400,780 Ops/sec
Native toString() 40,250,180 Ops/sec
bignumber.js toFixed(18) 438,182 Ops/sec
bignumber.js toString() 435,840 Ops/sec
big.js toString() 434,634 Ops/sec
big.js toFixed(18) 379,202 Ops/sec
decimal.js toString() 353,112 Ops/sec
decimal.js toFixed(18) 328,716 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests: