Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:103.0) Gecko/20100101 Firefox/103.0
Firefox 103
Mac OS X 10.15
Desktop
2 years ago
Test name Executions per second
Native toString() 1577239936.0 Ops/sec
Native toFixed(9) 13910046.0 Ops/sec
bignumber.js toString() 267536.6 Ops/sec
bignumber.js toFixed(18) 258745.1 Ops/sec
big.js toString() 182537.4 Ops/sec
big.js toFixed(18) 182569.6 Ops/sec
decimal.js toString() 288888.2 Ops/sec
decimal.js toFixed(18) 286349.1 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)