From 0beef3f03032a97bb0bda1539add7506a11cf2a8 Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Sat, 30 Dec 2017 03:54:18 +0100 Subject: [PATCH] benchmark: (arrays) use destructuring PR-URL: https://github.com/nodejs/node/pull/18250 Reviewed-By: Matteo Collina Reviewed-By: James M Snell --- benchmark/arrays/var-int.js | 4 +--- benchmark/arrays/zero-float.js | 4 +--- benchmark/arrays/zero-int.js | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/benchmark/arrays/var-int.js b/benchmark/arrays/var-int.js index a8acbf5ccbb..e36a909a3b9 100644 --- a/benchmark/arrays/var-int.js +++ b/benchmark/arrays/var-int.js @@ -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); diff --git a/benchmark/arrays/zero-float.js b/benchmark/arrays/zero-float.js index c8d7dbf7ed5..073460e0efb 100644 --- a/benchmark/arrays/zero-float.js +++ b/benchmark/arrays/zero-float.js @@ -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); diff --git a/benchmark/arrays/zero-int.js b/benchmark/arrays/zero-int.js index b16a6b6b720..78fd34ae6c0 100644 --- a/benchmark/arrays/zero-int.js +++ b/benchmark/arrays/zero-int.js @@ -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);