@indutny/bencher 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/bencher.js +2 -2
- package/package.json +1 -1
package/dist/bin/bencher.js
CHANGED
|
@@ -123,10 +123,10 @@ function warmUp(m) {
|
|
|
123
123
|
let iterations = 1;
|
|
124
124
|
let duration = 0;
|
|
125
125
|
do {
|
|
126
|
-
iterations *=
|
|
126
|
+
iterations *= 2;
|
|
127
127
|
duration = measure(m, Math.round(iterations));
|
|
128
128
|
} while (duration < maxSampleDuration);
|
|
129
|
-
iterations = Math.
|
|
129
|
+
iterations = Math.max(iterations / 2, (maxSampleDuration / duration) * iterations);
|
|
130
130
|
return iterations;
|
|
131
131
|
}
|
|
132
132
|
function measure(m, iterations) {
|