mirror of https://github.com/apache/lucene.git
Added a variation of BPV32 using only r/w long
This commit is contained in:
parent
775fb387b6
commit
702580a96d
|
@ -516,7 +516,7 @@ public class DocIdEncodingBenchmark {
|
||||||
public void encode(IndexOutput out, int start, int count, int[] docIds) throws IOException {
|
public void encode(IndexOutput out, int start, int count, int[] docIds) throws IOException {
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < count - 1; i += 2) {
|
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);
|
out.writeLong(packedLong);
|
||||||
}
|
}
|
||||||
for (; i < count; i++) {
|
for (; i < count; i++) {
|
||||||
|
|
Loading…
Reference in New Issue