Run details:
Mozilla/5.0 (iPhone; CPU iPhone OS 17_2_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2 Mobile/15E148 Safari/604.1
Mobile Safari 17
iOS 17.2.1
Mobile
11 months ago
Test name Executions per second
Native toString() 5532475.5 Ops/sec
Native toFixed(9) 5324427.5 Ops/sec
bignumber.js toString() 378998.5 Ops/sec
bignumber.js toFixed(18) 370606.6 Ops/sec
big.js toString() 377439.8 Ops/sec
big.js toFixed(18) 339654.4 Ops/sec
decimal.js toString() 267856.4 Ops/sec
decimal.js toFixed(18) 248396.0 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)


;