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 authored and Evan Lucas committed 2018-01-30 14:25:19 -06:00
1 parent 195bed21eb
commit 3543458988
3 files changed
+3 -9

No files matched your search

+1 -3
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);
+1 -3
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);
+1 -3
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);