Test name | Executions per second |
---|---|
Native | 98917000.0 Ops/sec |
BigInt | 40716508.0 Ops/sec |
decimal.js | 193176.5 Ops/sec |
<script src="https://cdnjs.cloudflare.com/ajax/libs/decimal.js/10.2.1/decimal.min.js"></script>
var a = 100;
var b = 200000;
var c = 31;
(((a + b) * b) ^ c).toString();
var a = 100n;
var b = 200000n;
var c = 31n;
(((a + b) * b) ^ c).toString();
var a = new Decimal("100");
var b = new Decimal("200000");
var c = new Decimal("31");
a.plus(b).times(b).pow(c).toString();