Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
decimal.js vs. bignumber.js
(version: 1)
- https://github.com/MikeMcl/bignumber.js/tree/v9.0.0 - https://github.com/MikeMcl/decimal.js/tree/v10.2.0
Comparing performance of:
bignumber.js vs decimal.js
Created:
6 months ago
by:
Guest
Go to the latest result
HTML Preparation code:
<!--script src="https://raw.githubusercontent.com/iriscouch/bigdecimal.js/v0.6.1/lib/bigdecimal.js"></script--> <script src="https://cdnjs.cloudflare.com/ajax/libs/bignumber.js/9.0.1/bignumber.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/big.js/6.0.3/big.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/decimal.js/10.2.1/decimal.min.js"></script> <!--script src="https://raw.githubusercontent.com/infusion/Fraction.js/v4.0.12/fraction.min.js"></script-->
Tests:
bignumber.js
const a = new BigNumber(0.1); a.plus(0.2).toNumber();
decimal.js
const a = new Decimal("0.1"); a.plus(0.2).toNumber();
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
bignumber.js
decimal.js
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
6 months ago
)
User agent:
Mozilla/5.0 (X11; Linux x86_64; rv:146.0) Gecko/20100101 Firefox/146.0
Browser/OS:
Firefox 146 on Linux
View result in a separate tab
Embed
Embed Benchmark Result
decimal.js
953K/s
bignumber.js
715K/s
View exact numbers
Test name
Executions per second
✓
decimal.js
953,339 Ops/sec
bignumber.js
714,822 Ops/sec
Related benchmarks
bignumber.js vs. big.js vs. decimal.js (I) toFixed(9)
bignumber.js vs. big.js vs. decimal.js (I) no native
bignumber.js vs. big.js vs. decimal.js (no to string)
bignumber.js vs. big.js vs. decimal.js in 2024-05-03
bignumber.js vs. big.js vs. decimal.js@10.4.3 (I)
bignumber.js vs. big.js vs. decimal.js 20250401
bignumber.js vs. big.js vs. decimal.js (I) vs bn.js
Comments
Confirm delete:
Do you really want to delete benchmark?