Skip to content

Commit

Permalink
Move comment
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Nov 7, 2021
1 parent 5110a18 commit cccaa1a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/stats/env_dev/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ const MIN_GROUP_SIZE = 2
// Using an integer >= 2 allows several implementation performance optimizations
export const CLUSTER_FACTOR = 2

// This is optimized for performance, which explains the imperative code.
// This is also optimized for memory, avoiding creating intermediary arrays.
const computeGroups = function ({
samples,
samples: { length },
Expand All @@ -86,6 +84,8 @@ const getInitGroup = function (clusterSize, mean) {
return { clusterSize, groupMean, sum: 0, deviationSum: 0 }
}

// This is optimized for performance, which explains the imperative code.
// This is also optimized for memory, avoiding creating intermediary arrays.
const iterateOnGroups = function ({
groups,
groups: [firstGroup],
Expand Down

0 comments on commit cccaa1a

Please sign in to comment.