Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36
Chrome 124
Windows
Desktop
8 months ago
Test name Executions per second
Native toString() 3522886.2 Ops/sec
Native toFixed(9) 3537945.0 Ops/sec
bignumber.js toString() 294021.8 Ops/sec
bignumber.js toFixed(18) 295739.5 Ops/sec
big.js toString() 288025.4 Ops/sec
big.js toFixed(18) 257287.5 Ops/sec
decimal.js toString() 224029.5 Ops/sec
decimal.js toFixed(18) 232781.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)