msokolov opened a new issue, #15424:
URL: https://github.com/apache/lucene/issues/15424

   ### Description
   
   `HnswGraph.ArrayNodesIterator` has two implementations: one that iterates 
over an array, and another that just counts up to a maximum value. We should 
split out the maximum value one into a separate class (`DenseNodesIterator`?) 
if only to make the name more honest. It would also save a fair amount of 
branch testing (one for each iteration).
   
   At the same time, we can improve `HnswGraph.getSortedNodes`. In the level 0 
(dense) case we are: allocating an array, copying all the values from 0..size-1 
into the array, sorting it, and then iterating over it?! Instead we should 
change this method to return a NodesIterator and simply return a DenseIterator 
in that case


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to