You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2022/02/03 05:30:16 UTC
[GitHub] [lucene] jtibshirani commented on pull request #641: LUCENE-10391: Reuse data structures across HnswGraph#searchLevel calls
jtibshirani commented on pull request #641:
URL: https://github.com/apache/lucene/pull/641#issuecomment-1028617830
This PR contains two changes:
* Reuse `visited` bit set across calls. For graph construction, switch to `FixedBitSet` instead of `SparseBitSet`.
* Reuse `candidates` queue across calls.
They both seem to have a small positive impact on indexing. Here's an example using `KnnGraphTester` with `glove-100-angular`:
**Baseline:** 788966 msec to write vectors
**Only reuse visited set:** 768152 msec to write vectors
**PR (reuse both visited and candidates):** 760896 msec to write vectors
The PR also shows a small search improvement:
**Baseline**
```
Recall QPS
0.741 2515.710
0.814 1589.089
0.924 459.971
```
**PR (reuse both visited and candidates)**
```
Recall QPS
0.740 2569.156
0.813 1626.779
0.925 468.207
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org