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

Revision 15 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("0.1")
var b = new BigNumber("0.2")
//a.plus(b).times(b).toString()
a.mod(b)
ready
Big
var a = new Big("0.1")
var b = new Big("0.2")
//a.plus(b).times(b).toString()
a.mod(b)
ready
Decimal
var a = new Decimal("0.1")
var b = new Decimal("0.2")
//a.plus(b).times(b).toString()
a.mod(b)
ready
BigDecimal
var a = new BigDecimal("0.1")
var b = new BigDecimal("0.2")
//a.add(b).multiply(b).toString()
a.remainder(b)
ready

Revisions

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