Skip to content

Commit

Permalink
benchmark: do not multiply n by 1e6 in arrays
Browse files Browse the repository at this point in the history
PR-URL: #20125
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
  • Loading branch information
apapirovski authored and jasnell committed Apr 23, 2018
1 parent 6278c4b commit f572927
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions benchmark/arrays/var-int.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ const bench = common.createBenchmark(main, {
'Float32Array',
'Float64Array'
],
n: [25]
n: [25e6]
});

function main({ type, n }) {
const clazz = global[type];

bench.start();
const arr = new clazz(n * 1e6);
const arr = new clazz(n);
for (var i = 0; i < 10; ++i) {
run();
}
Expand Down
4 changes: 2 additions & 2 deletions benchmark/arrays/zero-float.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ const bench = common.createBenchmark(main, {
'Float32Array',
'Float64Array'
],
n: [25]
n: [25e6]
});

function main({ type, n }) {
const clazz = global[type];

bench.start();
const arr = new clazz(n * 1e6);
const arr = new clazz(n);
for (var i = 0; i < 10; ++i) {
run();
}
Expand Down
4 changes: 2 additions & 2 deletions benchmark/arrays/zero-int.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ const bench = common.createBenchmark(main, {
'Float32Array',
'Float64Array'
],
n: [25]
n: [25e6]
});

function main({ type, n }) {
const clazz = global[type];

bench.start();
const arr = new clazz(n * 1e6);
const arr = new clazz(n);
for (var i = 0; i < 10; ++i) {
run();
}
Expand Down

0 comments on commit f572927

Please sign in to comment.