Prefix Filter: Practically and Theoretically Better Than Bloom

Tomer Even, Guy Even, Adam Morrison
3/31/2022
14 citations
cs.DScs.DB

Official code: FastFilter/fastfilter_cpp (286 stars, C++, Apache-2.0, last commit 2026-09-21). 1 more implementation below.

Abstract

Many applications of approximate membership query data structures, or filters, require only an incremental filter that supports insertions but not deletions. However, the design space of incremental filters is missing a "sweet spot" filter that combines space efficiency, fast queries, and fast insertions.

Show full abstract

Incremental filters, such as the Bloom and blocked Bloom filter, are not space efficient. Dynamic filters (i.e., supporting deletions), such as the cuckoo or vector quotient filter, are space efficient but do not exhibit consistently fast insertions and queries. In this paper, we propose the prefix filter, an incremental filter that addresses the above challenge: (1) its space (in bits) is similar to state-of-the-art dynamic filters; (2) query throughput is high and is comparable to that of the cuckoo filter; and (3) insert throughput is high with overall build times faster than those of the vector quotient filter and cuckoo filter by $1.39\times$-$1.46\times$ and $3.2\times$-$3.5\times$, respectively. We present a rigorous analysis of the prefix filter that holds also for practical set sizes (i.e., $n=2^{25}$). The analysis deals with the probability of failure, false positive rate, and probability that an operation requires accessing more than a single cache line.

View on arXivView PDF

Code Implementations(2)

Code implementations of this paper
RepositoryTypeStarsLanguageLicenseLast commit
FastFilter/fastfilter_cppOfficial286C++Apache-2.02026-09-21
TomerEven/Prefix-FilterOfficial50C++–2022-09-12
Apache-2.0

Fast Approximate Membership Filters (C++)

28633C++, CNov 7, 20182 months agoApache-2.0

Prefix Filter: Practically and Theoretically Better Than Bloom.

504C++, PythonMar 18, 20224 years agoNOASSERTION
amqapproximate-membership-querybloom-filtercuckoo-filterfilter+2 more

Similar Papers

Cite this paper

@article{even2022prefix,
  title  = {Prefix Filter: Practically and Theoretically Better Than Bloom},
  author = {Tomer Even and Guy Even and Adam Morrison},
  year   = {2022},
  eprint = {2203.17139},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2203.17139}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2203.17139.svg)](https://codeofpaper.com/paper/2203.17139)

Discussion