Conversation
There was a problem hiding this comment.
Pull request overview
This PR focuses on improving performance/codegen for MinMax distance computations in the quantization layer by ensuring the relevant evaluate implementations are always inlined.
Changes:
- Added
#[inline(always)]to MinMaxPureDistanceFunction::evaluateimpls to force inlining of distance evaluation paths. - Covered MinMax inner product, L2-squared, cosine, and cosine-normalized distance evaluators (including full-query variants).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #935 +/- ##
=======================================
Coverage 89.33% 89.33%
=======================================
Files 448 448
Lines 84054 84054
=======================================
Hits 75089 75089
Misses 8965 8965
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
hildebrandmw
left a comment
There was a problem hiding this comment.
Out of curiosity - is there any perf-related reason, or is it mainly aesthetic?
@hildebrandmw, it's mainly aesthetic to be honest. External users of this code path use this in a performance sensitive path and want to be sure that there are no avoidable inefficiencies. |
I missed inlining the distance computation path for minmax... again.