jpountz opened a new issue, #15024: URL: https://github.com/apache/lucene/issues/15024
`Lucene99HnswVectorsReader` computes prefix sums by doing: ```java currentNeighborsBuffer[0] = dataIn.readVInt(); for (int i = 1; i < arcCount; i++) { currentNeighborsBuffer[i] = currentNeighborsBuffer[i - 1] + dataIn.readVInt(); } ``` However, the investigation on #14979 suggests that a faster way of writing this loop would be ```java int sum = 0; for (int i = 0; i < arcCount; i++) { sum += dataIn.readVInt(); currentNeighborsBuffer[i] = sum; } ``` -- 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.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