HTML Preparation code:
Script Preparation code:
Tests:

Historical Performance Data aggregated from 5 community runs

Desktop Results:
Chrome 5 runs
Native toFixed(9)
39.2M/s
Native toString()
39.0M/s
big.js toString()
382K/s
bignumber.js toString()
357K/s
decimal.js toString()
328K/s
big.js toFixed(18)
327K/s
bignumber.js toFixed(18)
317K/s
decimal.js toFixed(18)
273K/s

Fastest: Native toFixed(9) (143.9x faster)

View exact numbers
  • Native toFixed(9): 39,231,052 ops/sec
  • Native toString(): 39,037,840 ops/sec
  • big.js toString(): 381,951 ops/sec
  • bignumber.js toString(): 357,442 ops/sec
  • decimal.js toString(): 328,054 ops/sec
  • big.js toFixed(18): 326,852 ops/sec
  • bignumber.js toFixed(18): 316,740 ops/sec
  • decimal.js toFixed(18): 272,548 ops/sec

Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    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)

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one month ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36
Chrome 149 on Windows
View result in a separate tab
Native toFixed(9)
45.4M/s
Native toString()
44.9M/s
bignumber.js toFixed(18)
431K/s
bignumber.js toString()
429K/s
big.js toString()
382K/s
decimal.js toString()
328K/s
big.js toFixed(18)
327K/s
decimal.js toFixed(18)
296K/s
View exact numbers
Test name Executions per second
Native toFixed(9) 45,412,636 Ops/sec
Native toString() 44,923,888 Ops/sec
bignumber.js toFixed(18) 431,243 Ops/sec
bignumber.js toString() 428,724 Ops/sec
big.js toString() 381,951 Ops/sec
decimal.js toString() 328,328 Ops/sec
big.js toFixed(18) 326,852 Ops/sec
decimal.js toFixed(18) 296,146 Ops/sec