summaryrefslogtreecommitdiff
path: root/benchmark/assert
diff options
context:
space:
mode:
Diffstat (limited to 'benchmark/assert')
-rw-r--r--benchmark/assert/deepequal-object.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/benchmark/assert/deepequal-object.js b/benchmark/assert/deepequal-object.js
index a8c539426a..7418e2a745 100644
--- a/benchmark/assert/deepequal-object.js
+++ b/benchmark/assert/deepequal-object.js
@@ -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);
@@ -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);
}