bignumber.js vs. big.js vs. decimal.js (v16)

Revision 16 of this benchmark created on


Preparation HTML

<script src="http://rawgit.com/dtrebbien/BigDecimal.js/master/build/BigDecimal-all-last.min.js"></script>
<script src="https://rawgithub.com/MikeMcl/bignumber.js/master/bignumber.min.js"></script>
<script src="https://rawgithub.com/MikeMcl/big.js/master/big.min.js"></script>
<script src="https://rawgithub.com/MikeMcl/decimal.js/master/decimal.min.js"></script>

Test runner

Ready to run.

Testing in
TestOps/sec
BigNumber
var a = new BigNumber("123456.999")
var b = new BigNumber("123456.999")
a.plus(b).div(b).toString()
ready
Big
var a = new Big("123456.999")
var b = new Big("123456.999")
a.plus(b).div(b).toString()
ready
Decimal
var a = new Decimal("123456.999")
var b = new Decimal("123456.999")
a.plus(b).div(b).toString()
ready
BigDecimal
var a = new BigDecimal("123456.999")
var b = new BigDecimal("123456.999")
a.add(b).div(b).toString()
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.