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() 1584273664.0 Ops/sec
Native toFixed(9) 28575330.0 Ops/sec
bignumber.js toString() 503224.6 Ops/sec
bignumber.js toFixed(18) 472343.6 Ops/sec
big.js toString() 529927.4 Ops/sec
big.js toFixed(18) 477209.4 Ops/sec
decimal.js toString() 518418.3 Ops/sec
decimal.js toFixed(18) 485442.4 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)