Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36
Chrome 121
Mac OS X 10.15.7
Desktop
one year ago
Test name Executions per second
Native 98917000.0 Ops/sec
BigInt 40716508.0 Ops/sec
decimal.js 193176.5 Ops/sec
HTML Preparation code:
x
 
1
<script src="https://cdnjs.cloudflare.com/ajax/libs/decimal.js/10.2.1/decimal.min.js"></script>
2
Tests:
  • Native

     
    var a = 100;
    var b = 200000;
    var c = 31;
    (((a + b) * b) ^ c).toString();
  • BigInt

     
    var a = 100n;
    var b = 200000n;
    var c = 31n;
    (((a + b) * b) ^ c).toString();
  • decimal.js

     
    var a = new Decimal("100");
    var b = new Decimal("200000");
    var c = new Decimal("31");
    a.plus(b).times(b).pow(c).toString();