Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
tomtomwombat committed Mar 4, 2024
1 parent bdb8deb commit ea7d981
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,18 @@ let filter = BloomFilter::builder(num_bits)
```

### Background
Bloom filters are space efficient approximate membership set data structures. False positives from a membership check are possible, but false negatives are not. [See more](https://en.wikipedia.org/wiki/Bloom_filter).
Bloom filters are space efficient approximate membership set data structures. False positives from a membership check are possible, but false negatives are not. [See more.](https://en.wikipedia.org/wiki/Bloom_filter)

Blocked bloom filters are supported by an underlying bit vector, chunked into 512, 256, 128, or 64 bit "blocks", to track item membership. To insert, a number of bits are set at positions based on the item's hash in one of the underlying bit vector's blocks. To check membership, a number of bits are checked at positions based on the item's hash in one of the underlying bit vector's blocks. [See more on blocked bloom filters](https://web.archive.org/web/20070623102632/http://algo2.iti.uni-karlsruhe.de/singler/publications/cacheefficientbloomfilters-wea2007.pdf).
Blocked bloom filters are supported by an underlying bit vector, chunked into 512, 256, 128, or 64 bit "blocks", to track item membership. To insert, a number of bits are set at positions based on the item's hash in one of the underlying bit vector's blocks. To check membership, a number of bits are checked at positions based on the item's hash in one of the underlying bit vector's blocks.
```
hash(4) ──────┰─────┰───────────────┐
V V V
0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 1 0
^ ^ ^
└───────────┴───────────┴──── hash(3) (not in the set)
```
[See more on blocked bloom filters.](https://web.archive.org/web/20070623102632/http://algo2.iti.uni-karlsruhe.de/singler/publications/cacheefficientbloomfilters-wea2007.pdf)

Once constructed, neither the bloom filter's underlying memory usage nor number of bits per item change.

Expand Down

0 comments on commit ea7d981

Please sign in to comment.