| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent cf6b5e0 commit abe2eb9
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -24,8 +24,7 @@ function createObj(source, add = '') { | |||
| 24 | 24 | } | |
| 25 | 25 | ||
| 26 | 26 | function main({ size, n, method, strict }) { | |
| 27 | - // TODO: Fix this "hack". `n` should not be manipulated. | ||
| 28 | - n = Math.min(Math.ceil(n / size), 20); | ||
| 27 | + const len = Math.min(Math.ceil(n / size), 20); | ||
| 29 | 28 | ||
| 30 | 29 | const source = Array.apply(null, Array(size)); | |
| 31 | 30 | const actual = createObj(source); | |
@@ -39,8 +38,8 @@ function main({ size, n, method, strict }) { | |||
| 39 | 38 | const value2 = method.includes('not') ? expectedWrong : expected; | |
| 40 | 39 | ||
| 41 | 40 | bench.start(); | |
| 42 | - for (let i = 0; i < n; ++i) { | ||
| 41 | + for (let i = 0; i < len; ++i) { | ||
| 43 | 42 | fn(actual, value2); | |
| 44 | 43 | } | |
| 45 | - bench.end(n); | ||
| 44 | + bench.end(len); | ||
| 46 | 45 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments