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 @@ -1817,6 +1817,11 @@ mod bucketed_history {
18171817 // Because the first thing we do is check if `total_valid_points` is sufficient to consider
18181818 // the data here at all, and can return early if it is not, we want this to go first to
18191819 // avoid hitting a second cache line load entirely in that case.
1820+ //
1821+ // Note that we store it as an `f64` rather than a `u64` (potentially losing some
1822+ // precision) because we ultimately need the value as an `f64` when dividing bucket weights
1823+ // by it. Storing it as an `f64` avoids doing the additional int -> float conversion in the
1824+ // hot score-calculation path.
18201825 total_valid_points_tracked : f64 ,
18211826 min_liquidity_offset_history : HistoricalBucketRangeTracker ,
18221827 max_liquidity_offset_history : HistoricalBucketRangeTracker ,
You can’t perform that action at this time.
0 commit comments