Lucene99HnswVectorsReader computes prefix sums by doing:
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
int sum = 0;
for (int i = 0; i < arcCount; i++) {
sum += dataIn.readVInt();
currentNeighborsBuffer[i] = sum;
}