Skip to content

Commit

Permalink
Merge branch 'master' of github.com:FastFilter/xorfilter
Browse files Browse the repository at this point in the history
  • Loading branch information
lemire committed Jan 8, 2022
2 parents bb84e32 + 9c49590 commit 3ef4561
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 2 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/pr-conventions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: PR Conventions
on:
pull_request_target:
types:
- opened
- edited
- synchronize

jobs:
lint:
name: Lint PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v3.6.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
validateSingleCommit: true
14 changes: 14 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
on:
push:
branches:
- main

name: release-please
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: GoogleCloudPlatform/release-please-action@v3
with:
release-type: go
package-name: xorfilter
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Bloom filters are used to quickly check whether an element is part of a set.
Xor and binary fuse filters are a faster and more concise alternative to Bloom filters.
They are also smaller than cuckoo filters.

* Thomas Mueller Graf, Daniel Lemire, Binary Fuse Filters: Fast and Smaller Than Xor Filters
* 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
* 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

<img src="figures/comparison.png" width="50%"/>
Expand Down
14 changes: 14 additions & 0 deletions binaryfusefilter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
)

const NUM_KEYS = 1e6
const MID_NUM_KEYS = 11500
const SMALL_NUM_KEYS = 100


Expand Down Expand Up @@ -52,6 +53,19 @@ func TestBinaryFuse8Basic(t *testing.T) {
}
}

func TestBinaryFuse8Issue23(t *testing.T) {
for trials := 0; trials < 20; trials++ {
keys := make([]uint64, MID_NUM_KEYS)
for i := range keys {
keys[i] = rand.Uint64()
}
filter, error := PopulateBinaryFuse8(keys)
assert.Equal(t, nil, error)
for _, v := range keys {
assert.Equal(t, true, filter.Contains(v))
}
}
}

func TestBinaryFuse8Small(t *testing.T) {
keys := make([]uint64, SMALL_NUM_KEYS)
Expand Down
2 changes: 1 addition & 1 deletion xorfilter.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func resetSets(setsi []xorset) []xorset {
}

// The maximum number of iterations allowed before the populate function returns an error
var MaxIterations = 100
var MaxIterations = 1024

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

0 comments on commit 3ef4561

Please sign in to comment.