Skip to content

Commit

Permalink
fix XorBinaryFuse32
Browse files Browse the repository at this point in the history
  • Loading branch information
dkdt committed Nov 22, 2024
1 parent 6b64b54 commit 294c48e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ public boolean mayContain(long key) {
h1 ^= (int) ((hh >> 18) & segmentLengthMask);
h2 ^= (int) ((hh) & segmentLengthMask);
f ^= fingerprints[h0] ^ fingerprints[h1] ^ fingerprints[h2];
return (f & 0xff) == 0;
return (f & 0xffffffffL) == 0;
}

@Override
Expand Down
8 changes: 8 additions & 0 deletions fastfilter/src/test/java/org/fastfilter/TestAllFilters.java
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,14 @@ public static void main(String... args) {
System.out.println("size " + size);
test(TestFilterType.XOR_BINARY_FUSE_8, size, 0, true);
}
for (int size = 1; size <= 100; size++) {
System.out.println("size " + size);
test(TestFilterType.XOR_BINARY_FUSE_32, size, 0, true);
}
for (int size = 100; size <= 100000; size *= 1.1) {
System.out.println("size " + size);
test(TestFilterType.XOR_BINARY_FUSE_32, size, 0, true);
}
for (int size = 1_000_000; size <= 8_000_000; size *= 2) {
System.out.println("size " + size);
testAll(size, true);
Expand Down
1 change: 1 addition & 0 deletions jmh/src/main/java/org/fastfilter/ConstructionState.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public class ConstructionState {
"XOR_8",
"XOR_16",
"XOR_BINARY_FUSE_8",
"XOR_BINARY_FUSE_32",
"XOR_PLUS_8",
"CUCKOO_8",
"CUCKOO_16",
Expand Down

0 comments on commit 294c48e

Please sign in to comment.