You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MDEV-37107 - Optimise dot_product by loop-unrolling by a factor of 4
This patch introduces loop unrolling by a factor of 4 in the
dot_product() function used in vector-based distance calculations.
The goal is to improve SIMD utilization and overall performance during
high-throughput vector operations, particularly in indexing and search
routines that rely on this function.
Observations from benchmarking (ann-benchmark):
- Query Performance (QPS) improved by 4–10% across datasets.
- Indexation time reduced by 22–28%.
- Loop unrolling factors of 8 or 16 yielded similar performance to
factor-4 but made the code less readable. Hence, a factor of 4 was
chosen to maintain a balance between performance and code clarity.
This change is architecture-specific (PowerPC) and should not
introduce any behavioral regressions or side effects in unrelated
parts of the codebase.
Signed-off-by: Manjul Mohan <manjul.mohan@ibm.com>
0 commit comments