stefanvodita commented on PR #12844: URL: https://github.com/apache/lucene/pull/12844#issuecomment-1841841701
@zhaih - I also tried your [idea](https://github.com/apache/lucene/pull/12844#discussion_r1412533096) about `beamWidth`. I passed `beamWidth` in to `NeighborArray` and then changed the initial capacity of the arrays there, like so: ``` - int arraySize = Math.min(INITIAL_CAPACITY, maxSize); + int arraySize = Math.min(maxSize, beamWidth); ``` In the profiler, it doesn't look very different from baseline. I didn't see any resizing. If I understood you correctly, you were expecting there to be occasional resizing of arrays when `beamWidth < maxSize`. The latency isn't measurably better either. Results are averaged from 5 runs (baseline is [here](https://github.com/apache/lucene/pull/12844#issuecomment-1836064137)). ``` recall latency nDoc fanout maxConn beamWidth visited index ms 0.720 0.16 10000 0 64 250 100 2531 1.00 post-filter 0.542 0.23 100000 0 64 250 100 43960 1.00 post-filter 0.512 0.28 200000 0 64 250 100 111647 1.00 post-filter ``` -- 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-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org