Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function start () {
test = [sreq, sres, creq, cres]
// test = sreq
// sreq.sres = sres
// sreq.creq = creq
// sreq.cres = cres
for (var i in exports.compare) {
console.log(i)
var hash = exports.compare[i]()
console.log(hash)
console.log(hash.length)
console.log('')
}
require('bench').runMain()
}
};
let num = 1;
exports.done = function (data) {
profile.stop().then(() => console.log('Profiling stopped'));
bench.show(data);
console.error('done', num);
num = num + 1;
};
exports.time = 1000;
exports.countPerLap = 6;
exports.compareCount = 8;
profile.start();
const bench = require('bench');
bench.runMain();
}
};
let num = 1;
exports.done = function (data) {
profile.stop().then(() => console.log('Profiling stopped'));
bench.show(data);
console.error('done', num);
num = num + 1;
};
exports.time = 1000;
exports.countPerLap = 6;
exports.compareCount = 8;
profile.start();
const bench = require('bench');
bench.runMain();
}
var lp = require('../')
var coffee_partition = require('../test/alternate-implementation')
var weird_example = [0.5759878419452887, 1.0425531914893618, 0.8064516129032258, 0.7072135785007072, 0.3473336479471449, 0.6665, 2, 1.5066339066339067, 0.6408364083640836, 0.9742647058823529, 0.5703373647358371, 0.8057142857142857, 0.6533333333333333, 1.501466275659824, 0.6713333333333333, 1.393939393939394, 1.7777777777777777, 2.7015873015873018, 0.8764044943820225, 1.5005861664712778, 0.6323333333333333, 0.8166666666666667, 0.6666666666666666, 0.7692307692307693, 0.736875, 1.3333333333333333, 0.8301610541727672, 0.75, 0.7936507936507936, 0.5167322834645669, 0.7545126353790613, 0.7692307692307693, 0.707635009310987, 2, 0.6666666666666666, 0.7368055555555556, 0.74, 0.6614583333333334, 0.7692307692307693, 1.5060240963855422, 0.653, 1.7760416666666667, 1.5060240963855422, 1.3212435233160622, 0.9815157116451017, 0.6214833759590793, 1.3333333333333333, 0.8771929824561403, 0.7173601147776184, 0.6666666666666666, 0.8896797153024911, 1, 0.7604562737642585, 0.67, 1.5, 0.6521885521885522]
exports.compare = {
coffeescript: ()=> coffee_partition(weird_example, 33)
, ours: ()=> lp(weird_example, 33)
}
require('bench').runMain()
setTimeout(function () {
require('bench').runMain();
}, 1000);
exports.compare.diffRenderer = function() {
serializeHtml(html)
}
exports.compare.htmlParser = function() {
htmlParser.HTMLParser(html, {})
}
exports.compare.htmltree = function() {
htmltree(html, noop)
}
exports.stepsPerLap = 10
require('bench').runMain()
natok.addRule(options, handler)
var s = 'z'
var buf = new Buffer(s)
var compare = exports.compare = {}
compare[Atok.version] = function () {
atok.write(s)
}
compare[newAtok.version + ' string'] = function () {
natok.write(s)
}
compare[newAtok.version + ' buffer'] = function () {
natok.write(buf)
}
require("bench").runMain()