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 {
1805
1805
// Because the first thing we do is check if `total_valid_points` is sufficient to consider
1806
1806
// the data here at all, and can return early if it is not, we want this to go first to
1807
1807
// 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.
1808
1813
total_valid_points_tracked : f64 ,
1809
1814
min_liquidity_offset_history : HistoricalBucketRangeTracker ,
1810
1815
max_liquidity_offset_history : HistoricalBucketRangeTracker ,
You can’t perform that action at this time.
0 commit comments