Skip to content

Commit

Permalink
benchmark: (arrays) use destructuring
Browse files Browse the repository at this point in the history
PR-URL: #18250
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
BridgeAR authored and evanlucas committed Jan 30, 2018
1 parent 195bed2 commit 3543458
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 3543458

Please sign in to comment.