Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Chrome 120
Windows
Desktop
one year ago
Test name Executions per second
Native toString() 2614632.5 Ops/sec
Native toFixed(9) 2597730.5 Ops/sec
bignumber.js toString() 184200.1 Ops/sec
bignumber.js toFixed(18) 184514.4 Ops/sec
big.js toString() 179737.7 Ops/sec
big.js toFixed(18) 162751.0 Ops/sec
decimal.js toString() 158456.6 Ops/sec
decimal.js toFixed(18) 149709.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)