You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
363 B

var common = require('../common.js');
var bench = common.createBenchmark(main, {
millions: [2]
});
process.maxTickDepth = Infinity;
function main(conf) {
var n = +conf.millions * 1e6;
bench.start();
process.nextTick(onNextTick);
function onNextTick() {
if (--n)
process.nextTick(onNextTick);
else
bench.end(+conf.millions);
}
}