chore: clippy performance improvements

This commit is contained in:
Per Stark
2025-10-15 22:24:59 +02:00
parent 35ff4e1464
commit c3a7e8dc59
11 changed files with 51 additions and 55 deletions

View File

@@ -123,7 +123,10 @@ pub fn fuse_scores(scores: &Scores, weights: FusionWeights) -> f32 {
let fts = scores.fts.unwrap_or(0.0);
let graph = scores.graph.unwrap_or(0.0);
let mut fused = vector * weights.vector + fts * weights.fts + graph * weights.graph;
let mut fused = graph.mul_add(
weights.graph,
vector.mul_add(weights.vector, fts * weights.fts),
);
let signals_present = scores
.vector