File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -1805,6 +1805,11 @@ mod bucketed_history {
18051805 // Because the first thing we do is check if `total_valid_points` is sufficient to consider
18061806 // the data here at all, and can return early if it is not, we want this to go first to
18071807 // avoid hitting a second cache line load entirely in that case.
1808+ //
1809+ // Note that we store it as an `f64` rather than a `u64` (potentially losing some
1810+ // precision) because we ultimately need the value as an `f64` when dividing bucket weights
1811+ // by it. Storing it as an `f64` avoids doing the additional int -> float conversion in the
1812+ // hot score-calculation path.
18081813 total_valid_points_tracked : f64 ,
18091814 min_liquidity_offset_history : HistoricalBucketRangeTracker ,
18101815 max_liquidity_offset_history : HistoricalBucketRangeTracker ,
You can’t perform that action at this time.
0 commit comments