benchmark: (arrays) use destructuring

PR-URL: https://github.com/nodejs/node/pull/18250
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Ruben Bridgewater 2017-12-30 03:54:18 +01:00
parent a3555d0583
commit 0beef3f030
No known key found for this signature in database
GPG Key ID: F07496B3EB3C1762
3 changed files with 3 additions and 9 deletions

View File

@ -17,10 +17,8 @@ const bench = common.createBenchmark(main, {
n: [25]
});
function main(conf) {
const type = conf.type;
function main({ type, n }) {
const clazz = global[type];
const n = +conf.n;
bench.start();
const arr = new clazz(n * 1e6);

View File

@ -17,10 +17,8 @@ const bench = common.createBenchmark(main, {
n: [25]
});
function main(conf) {
const type = conf.type;
function main({ type, n }) {
const clazz = global[type];
const n = +conf.n;
bench.start();
const arr = new clazz(n * 1e6);

View File

@ -17,10 +17,8 @@ const bench = common.createBenchmark(main, {
n: [25]
});
function main(conf) {
const type = conf.type;
function main({ type, n }) {
const clazz = global[type];
const n = +conf.n;
bench.start();
const arr = new clazz(n * 1e6);