Skip to content

Commit 3ef4561

Browse files
committed
Merge branch 'master' of github.com:FastFilter/xorfilter
2 parents bb84e32 + 9c49590 commit 3ef4561

File tree

5 files changed

+48
-2
lines changed

5 files changed

+48
-2
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: PR Conventions
2+
on:
3+
pull_request_target:
4+
types:
5+
- opened
6+
- edited
7+
- synchronize
8+
9+
jobs:
10+
lint:
11+
name: Lint PR title
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: amannn/[email protected]
15+
env:
16+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17+
with:
18+
validateSingleCommit: true
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
6+
name: release-please
7+
jobs:
8+
release-please:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: GoogleCloudPlatform/release-please-action@v3
12+
with:
13+
release-type: go
14+
package-name: xorfilter

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Bloom filters are used to quickly check whether an element is part of a set.
66
Xor and binary fuse filters are a faster and more concise alternative to Bloom filters.
77
They are also smaller than cuckoo filters.
88

9-
* Thomas Mueller Graf, Daniel Lemire, Binary Fuse Filters: Fast and Smaller Than Xor Filters
9+
* Thomas Mueller Graf, Daniel Lemire, [Binary Fuse Filters: Fast and Smaller Than Xor Filters](http://arxiv.org/abs/2201.01174), Journal of Experimental Algorithmics (to appear). DOI: 10.1145/3510449
1010
* Thomas Mueller Graf, Daniel Lemire, [Xor Filters: Faster and Smaller Than Bloom and Cuckoo Filters](https://arxiv.org/abs/1912.08258), Journal of Experimental Algorithmics 25 (1), 2020. DOI: 10.1145/3376122
1111

1212
<img src="figures/comparison.png" width="50%"/>

binaryfusefilter_test.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
)
1010

1111
const NUM_KEYS = 1e6
12+
const MID_NUM_KEYS = 11500
1213
const SMALL_NUM_KEYS = 100
1314

1415

@@ -52,6 +53,19 @@ func TestBinaryFuse8Basic(t *testing.T) {
5253
}
5354
}
5455

56+
func TestBinaryFuse8Issue23(t *testing.T) {
57+
for trials := 0; trials < 20; trials++ {
58+
keys := make([]uint64, MID_NUM_KEYS)
59+
for i := range keys {
60+
keys[i] = rand.Uint64()
61+
}
62+
filter, error := PopulateBinaryFuse8(keys)
63+
assert.Equal(t, nil, error)
64+
for _, v := range keys {
65+
assert.Equal(t, true, filter.Contains(v))
66+
}
67+
}
68+
}
5569

5670
func TestBinaryFuse8Small(t *testing.T) {
5771
keys := make([]uint64, SMALL_NUM_KEYS)

xorfilter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ func resetSets(setsi []xorset) []xorset {
107107
}
108108

109109
// The maximum number of iterations allowed before the populate function returns an error
110-
var MaxIterations = 100
110+
var MaxIterations = 1024
111111

112112
// Populate fills the filter with provided keys.
113113
// The caller is responsible to ensure that there are no duplicate keys.

0 commit comments

Comments
 (0)