Skip to content

Commit

Permalink
benchmark: (arrays) use destructuring
Browse files Browse the repository at this point in the history
PR-URL: nodejs#18250
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
BridgeAR authored and MayaLekova committed May 8, 2018
1 parent 5ec8994 commit f1a4adf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
4 changes: 1 addition & 3 deletions benchmark/arrays/var-int.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 1 addition & 3 deletions benchmark/arrays/zero-float.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 1 addition & 3 deletions benchmark/arrays/zero-int.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f1a4adf

Please sign in to comment.