Added a variation of BPV32 using only r/w long

This commit is contained in:
expani 2024-10-26 22:32:19 +05:30
parent 775fb387b6
commit 702580a96d
1 changed files with 1 additions and 1 deletions

View File

@ -516,7 +516,7 @@ public class DocIdEncodingBenchmark {
public void encode(IndexOutput out, int start, int count, int[] docIds) throws IOException {
int i;
for (i = 0; i < count - 1; i += 2) {
long packedLong = ((long) docIds[i] << 32) & docIds[i + 1];
long packedLong = (((long) docIds[i]) << 32) | docIds[i + 1];
out.writeLong(packedLong);
}
for (; i < count; i++) {