Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
try {
bignum = require('bignum');
} catch (err) {
console.log('Load bignum error: ' + err.message.split('\n')[0]);
}
var sjcl = require('eccjs').sjcl.bn;
var bigi = require('bigi');
var BigInteger = require('js-big-integer').BigInteger;
var SilentMattBigInteger = require('biginteger').BigInteger;
var XorShift128Plus = require('xorshift.js').XorShift128Plus;
var benchmarks = [];
var selfOnly = process.env.SELF_ONLY;
var seed = process.env.SEED || crypto.randomBytes(16).toString('hex');
console.log('Seed: ' + seed);
var prng = new XorShift128Plus(seed);
var fixtures = [];
var findex = 0;
function findexRefresh () {
findex = 0;
}
function add (op, obj) {
benchmarks.push({
name: op,
start: function start () {
var suite = new benchmark.Suite();
console.log('Benchmarking: ' + op);
Object.keys(obj).forEach(function (name) {