Skip to content

Commit

Permalink
Fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Sep 5, 2021
1 parent f2b2542 commit 3e7dab2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/run/measure/min_loop_duration.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,7 @@ const getMinMeasureCost = function (measures) {
// How many times slower each repeat loop must last compared to `measureCost`.
// A lower value makes loops duration too close to `measureCost`, which
// decreases the quality and precision of all stats.
// A higher value makes the metrics rely on the arithmetic mean more than the
// median, which also decrease the stats quality, although not as much.
// A higher value decrease the stats quality, although not as much.
// Therefore, we use the smallest value that removes the `measureCost` influence
// enough.
const MEASURE_COST_RATIO = 1e2
Expand All @@ -183,7 +182,7 @@ const getMinResolution = function (measures) {

// Like `MEASURE_COST_RATIO` but for `resolution`.
// We use a higher ratio because:
// - `measureCost` influence is proportional to its stdev, not its median.
// - `measureCost` influence is proportional to its stdev, not its mean.
// However, for resolution, the whole unit granularity has an impact.
// - When `measureCost` is close to `resolution`, any variation of it is
// coarser. For example 2ns +|-1ns is 50% stdev.
Expand Down

0 comments on commit 3e7dab2

Please sign in to comment.