Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 Edg/116.0.1938.62
Chrome 116
Windows
Desktop
one year ago
Test name Executions per second
Native toString() 2077408.2 Ops/sec
Native toFixed(9) 2173606.0 Ops/sec
bignumber.js toString() 172188.1 Ops/sec
bignumber.js toFixed(18) 177403.6 Ops/sec
big.js toString() 122036.8 Ops/sec
big.js toFixed(18) 71343.4 Ops/sec
decimal.js toString() 130822.8 Ops/sec
decimal.js toFixed(18) 128787.7 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • Native toString()

  • Native toFixed(9)

  • bignumber.js toString()

  • bignumber.js toFixed(18)

  • big.js toString()

  • big.js toFixed(18)

  • decimal.js toString()

  • decimal.js toFixed(18)


;