Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

benchmark: remove input param manipulation #41741

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 3 additions & 4 deletions benchmark/assert/deepequal-object.js
Expand Up @@ -24,8 +24,7 @@ function createObj(source, add = '') {
}

function main({ size, n, method, strict }) {
// TODO: Fix this "hack". `n` should not be manipulated.
n = Math.min(Math.ceil(n / size), 20);
const len = Math.min(Math.ceil(n / size), 20);

const source = Array.apply(null, Array(size));
const actual = createObj(source);
Expand All @@ -39,8 +38,8 @@ function main({ size, n, method, strict }) {
const value2 = method.includes('not') ? expectedWrong : expected;

bench.start();
for (let i = 0; i < n; ++i) {
for (let i = 0; i < len; ++i) {
fn(actual, value2);
}
bench.end(n);
bench.end(len);
}