weizijun commented on PR #14527: URL: https://github.com/apache/lucene/pull/14527#issuecomment-2863408186
> I don't understand this. How does the FloatArrayList bypass the overallocation possible via `ArrayUtils.grow`? Its the same structure right? and for every node there is a score. maxSize controls the total number of array values, so if the length of ArrayUtils.grow exceeds maxSize, the actual value will not exceed maxSize. However, the nodes() method of NeighborArray returns nodes.buffer, so maxSize cannot control the int array. Therefore, a MaxSizedIntArrayList class is needed to ensure that the length of the int array can overflow maxSize. -- 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