Skip to content

Bulk score hnsw neighbor array#15958

Open
leng25 wants to merge 5 commits intoapache:mainfrom
leng25:bulk-score-hnsw-neighbor-array
Open

Bulk score hnsw neighbor array#15958
leng25 wants to merge 5 commits intoapache:mainfrom
leng25:bulk-score-hnsw-neighbor-array

Conversation

@leng25
Copy link
Copy Markdown
Contributor

@leng25 leng25 commented Apr 14, 2026

issue #15606

Refactor NeighborArray#isWorstNonDiverse to use bulkScore instead of score, enabling multiple nodes to be evaluated at a time when searching for the worst neighbor to remove.

This change follows the approach taken in #15607, though unlike that case, this function is called less frequently so the direct performance gains are modest and within margin of error.

The primary motivation is consistency, aligning both call sites to use bulkScore ensures this code automatically benefits from any future optimizations made to implementations of that function.

Benchmarks run using luceneutil knnPerfTest
on a ThinkPad T14 Gen 1 (Intel i5-10210U, 8 logical cores, 16GB RAM, Linux).
Dataset: Cohere v3 Wikipedia 1024d, 50K docs, dot_product metric,
maxConn=64, beamWidthIndex=250, quantizeBits=8.

Version recall index(s) index_docs/s force_merge(s) latency(ms) QPS
baseline 0.985 74.35 672.54 0.02 8.233 121
candidate 0.985 73.83 677.26 0.02 8.282 120

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant