Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
JS Big Integers v2
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36
Browser:
Chrome 136
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
JSBN
0.0 Ops/sec
SJCL BN
3129.4 Ops/sec
BigInteger.js
47949.7 Ops/sec
native BigInt
472744.3 Ops/sec
HTML Preparation code:
<script src="https://burak.fr/jsbn.js"></script> <script src="https://burak.fr/jsbn2.js"></script> <script src="https://rawgithub.com/bitwiseshiftleft/sjcl/master/sjcl.js"></script> <script src="https://rawgithub.com/bitwiseshiftleft/sjcl/master/core/bn.js"></script> <script src="https://rawgithub.com/peterolson/BigInteger.js/master/BigInteger.min.js"></script>
Script Preparation code:
var n1 = "f10853b38e67ed882bc0284b8e71581469806699e8a028a19cd8cac913a3f8b859ee0999833886f13987ecf4ed3a11cf6aabd0b074531f5ef338f624e62429ff"; var n2 = "d978cfde1678dc8ce9dab4bfe2e1fa8be09a5668cd8e607cc24f28e440495c7f4b5317d6533e3fb232ebce63fab872ece25935a5cacc5cb8a94b5"; var five = "5";
Tests:
JSBN
a = new BigInteger(n1, 16); b = new BigInteger(n2, 16); c = a.subtract(b); c = a.mod(b); c = a.multiply(b); c = a.add(b); c = a.modPow(new BigInteger(five), b);
SJCL BN
a = new sjcl.bn(n1); b = new sjcl.bn(n2); c = a.sub(b); c = a.mod(b); c = a.mul(b); c = a.add(b); c = a.powermod(new sjcl.bn(five), b);
BigInteger.js
a = bigInt(n1, 16); b = bigInt(n2, 16); c = a.subtract(b); c = a.mod(b); c = a.multiply(b); c = a.add(b); c = a.modPow(bigInt(five), b);
native BigInt
a = BigInt('0x' + n1); b = BigInt('0x' + n2); c = a - b; c = a % b; c = a * b; c = a + b; c = a ** BigInt(five) % b;