Most keys queried against a giant index are not in the set, so storing exact keys in memory just to answer “no” wastes nearly all your RAM. In July 1970, Burton H. Bloom showed in Communications of the ACM that tolerating a small, predictable rate of false positives shrinks a membership filter enough to keep it in fast primary memory instead of spilling onto slow disk.
Interestingly, Bloom never named the structure after himself. He called it Method 2 and derived it against two alternatives: conventional error-free hashing and Method 1 (open-addressed short hash codes). Five decades later, Method 2 guards SSTable reads in RocksDB and Cassandra, blocks compromised passwords, filters URL crawls, and shields origin caches from one-hit-wonder lookups.
- Built for mostly-negative workloads: Bloom targets problems where most queries miss (such as a 500,000-word hyphenation workload where 450,000 words follow simple rules and 50,000 exceptions live on disk), scoring algorithms by average reject time
T. - Nearly 7x smaller than exact core hashing: storing 50,000 19-bit exception keys in a conventional hash table at
T = 4took 2,000,000 bits, whereas Method 2 at error rateP = 1/16took 291,200 bits and cut disk reads by 84.4%. - Optimal density sits at 50% ones (
T'' = 2): across any target error rateP, Method 2 minimizes memory when expected0-bits equal1-bits (phi'' = 1/2), hittingS'' = log2(e)(roughly 1.44 bits per element per-log2 P, printed as1.47in Bloom’s 1970 paper). - Clear boundaries by design: Method 2 cannot match Method 1’s unboundedly small error rates without unbounded space, cannot delete keys without corrupting neighbors, and assumes constant single-bit access times.
Why short-code hashing loses to a flat bit array
Bloom starts with conventional open-addressed hashing of n messages, each b bits long, into h cells of b + 1 bits (1 leading flag bit plus b message bits), where phi = (h - n) / h is the fraction of empty cells. When rejecting a nonmember, hitting an empty cell takes 1 bit check, while hitting an occupied mismatched cell checks E = sum_{x>=1} (x + 1)(1/2)^x = 3 bits on average before probing again, yielding normalized reject time T = (3 / phi) - 2 and space N = n * (b + 1) * (T + 2) / (T - 1).
Method 1 shrinks each cell from b + 1 bits down to c bits storing a non-unique hash code (1 >> P >> 2^(-b)). Because unrelated messages can collide on the same c-bit code before probing reaches an empty cell, the false-positive rate is P' = (1/2)^(c-1) / phi'. To compare architectures fairly across any set size n and allowable error P, Bloom defines the normalized space metric S = N / (-n * log2 P). For Method 1, Equations 23 and 25 show S' can never beat (T' + 2) / (T' - 1). Why? Even with short codes, Method 1 still walls off individual cells (leaving phi' fraction of cells empty) and pays probe penalties (E = 3 bits) on every collision.
Method 2 throws away cell boundaries entirely. The hash area is simply N'' individually addressable bits initialized to 0. Inserting a key hashes it to d distinct bit addresses and sets all d bits to 1; testing a key checks those same d bits and rejects the instant any bit is 0, returning zero false negatives.
After n insertions (d << N''), the expected fraction of remaining 0 bits is phi'' = (1 - d / N'')^n, giving false-positive rate P'' = (1 - phi'')^d. Because a nonmember stops at the first 0 bit (x bits tested with probability phi'' * (1 - phi'')^(x-1)), the expected reject time is simply T'' = 1 / phi''. Substituting into normalized space gives Equation 24: S'' = log2(e) / (log2(1/T'') * log2(1 - 1/T'')). Across every operating point in Figure 1 of the paper, Method 2’s space-time curve sits dramatically below Method 1, especially at fast reject times near T = 2.
The 50% fill rule and Bloom’s hyphenation testbed
Method 2 hides a sharp diminishing-returns trap. Adding more hash probes d initially lowers error P'' = (1 - phi'')^d, but setting more bits per key also fills the array with 1s, shrinking phi'' and raising the chance every probe hits an accidental 1.
Bloom proves in Figure 1 (page 426) that normalized space S'' reaches its exact minimum when 1 / T'' = 1 - 1 / T'', meaning T'' = 2 and phi'' = 0.5. At that 50% fill point, an average miss stops after checking just 2 bits, and the optimal space overhead collapses to S'' = log2(e) (roughly 1.44 bits per element per -log2 P, printed as 1.47 in Bloom’s 1970 text).
To make the payoff concrete, Bloom sizes an automatic hyphenation program handling 500,000 words: 450,000 words follow simple grammatical rules while 50,000 exceptions require a disk dictionary. Storing 50,000 19-bit keys in a conventional core hash table at T = 4 demands 2,000,000 bits, spilling onto disk. Using Method 2 at T = 2 with allowable error P = 1/16 (6.25%) shrinks the core filter to 291,200 bits (less than 300,000 bits). That filter misses 450,000 * 15/16 regular words immediately and triggers disk lookups only on 50,000 + 450,000/16 = 78,125 (~78,000 words, or 16%), saving 84.4% of disk accesses compared to keeping the conventional hash table on disk.
Compare Bloom’s Table I error budgets
Tightening error rate P buys linear bit growth (72,800 bits per factor-of-2 reduction in P across Table I’s first five rows) while disk savings saturate quickly once true positives (50,000 exception words) dominate total reads. Step through the five regimes below to compare Table I’s hyphenation numbers alongside Method 1’s crossover point.
Select an operating regime (or use Left and Right arrow keys) to inspect Table I's memory budget, wasted disk reads, and where Method 1 differs.
Smallest possible filter: 72,800 bits, 45.0% disk saved
Table I minimumSetting P = 1/2 uses minimum memory yet still sends half of all 450,000 rule-handled words to the slow disk dictionary.
- Why aggressive sizing stalls
- 450,000 / 2 = 225,000 false disk reads stack atop 50,000 true hits, forcing 275,000 slow lookups across 500,000 words.
- Method 2 configuration
- 72,800 core bits at optimal T'' = 2 (50% fill), cutting disk I/O by 45.0% compared to a disk-resident index.
- Space vs. exact hash
- 27.5x smaller than the 2,000,000-bit conventional hash table, yet wastes most of the potential I/O speedup.
- When it fits
- Only when primary RAM is severely starved and secondary checks are cheap relative to memory cost.
Tripling memory to 218,400 bits saves 78.7% of disk reads
Table I midpointSpending 3 bits worth of -log2 P slashes wasted false-positive disk reads from 225,000 down to 56,250.
- Remaining noise
- 56,250 false positives still exceed the 50,000 true dictionary hits, leaving room for one more halving step.
- Method 2 configuration
- 218,400 core bits (~27 KB) at T'' = 2 pushes total disk accesses down to ~106,250 out of 500,000 words.
- Stepping from 1/4
- Adding 72,800 bits from P = 1/4 (145,600 bits, 67.5% saved) buys another 11.2 percentage points of disk savings.
- Practical lesson
- Each extra ~1.44 bits per item halves false-positive I/O cleanly until true hits dominate.
291,200 bits eliminates 84.4% of disk accesses
Bloom's sweet spotBloom highlights P = 1/16 as the knee of the curve: under 300,000 bits in core cuts disk traffic down to roughly 16% of words.
- Why exactness still trails
- Even here, 28,125 wasted disk checks occur on misses, which applications must swallow via a fast negative disk probe.
- Method 2 configuration
- 291,200 core bits (~36 KB) reduces disk lookups to ~78,000 words (50,000 true hits plus ~28,000 false positives).
- Stepping to 1/32
- Table I shows P = 1/32 (364,000 bits) raises disk savings only from 84.4% to 87.2%.
- Modern parallel
- Default 10-bits-per-key SSTable filters (around 0.8% to 1% FPR) target the same knee where disk hits match true lookups.
Diminishing returns: 509,800 bits for 88.5% savings
Table I tight boundGrowing the filter by 75% beyond P = 1/16 saves only 4.1% more disk reads because true exceptions dominate.
- Why extra bits stall
- Because 10% of all words (50,000) truly belong on disk, no filter can ever push total disk savings above 90%.
- Method 2 configuration
- 509,800 core bits (~64 KB) leaves ~7,031 false positives atop the 50,000 true lookups, hitting 88.5% savings.
- Design rule
- Never tune P orders of magnitude below your true-positive base rate unless secondary lookups are extraordinarily expensive.
- Still beats exact
- 509,800 bits remains nearly 4x smaller than the 2,000,000-bit conventional hash table.
Where short-code cells beat bit arrays
Boundary caseMethod 1 lags Method 2 across Figure 1, yet wins back ground in two edge regimes Bloom explicitly flags.
- Why Method 2 stalls near 0
- Because Method 2 requires 50% zeros at minimum space, error P'' shrinks only exponentially in space and never reaches true 0 without infinite bits.
- Method 1 advantage
- As allowable error approaches 2^(-b), Method 1 widens cell size c until cells hold full keys and reach exact 0% error.
- Hardware caveat (Fn. 1-2)
- Bloom warns that multibit word reads and the CPU cost of computing d independent hashes can erase Method 2's lead over probing one cell.
- Modern descendants
- Fingerprint-in-bucket designs like Cuckoo filters revive Method 1's spirit with 2-choice hashing to beat Bloom below ~3% FPR.
If you prefer the concise summary without clicking through the tabs, here is what Bloom’s Table I and Figure 1 establish:
P = 1/2(72,800bits): saves 45.0% of disk accesses, leaving 225,000 wasted reads on 450,000 regular words.P = 1/8(218,400bits): saves 78.7% of disk accesses as false-positive I/O drops to 56,250.P = 1/16(291,200bits): Bloom’s sweet spot saves 84.4% of disk accesses in under 300k bits (versus 2,000,000 bits for exact core hashing).P = 1/64(509,800bits): hits diminishing returns at 88.5% saved because the 50,000 true exceptions cap savings at 90%.- Method 1 boundary: short-code cells overtake Method 2 only when
Papproaches zero error (2^(-b)) or when multibit memory reads and multi-hash CPU costs outweigh single-bit probes.
Footnote 1, deletions, and modern filter variants
Three caveats straight from Bloom’s 1970 text explain why modern storage engines modify Method 2 instead of implementing it verbatim.
First, Bloom explicitly warned that his time metric idealized away CPU caches and hashing cost. Footnotes 1 and 2 on pages 424 and 425 note that his analysis charges 1 equal unit to test any single bit, ignoring both the cost of computing d separate hash addresses and the fact that computers read memory in multi-bit words. On modern CPUs where fetching a 64-byte cache line costs the same as reading 1 bit, scattering d = 7 or 10 probes across a multi-megabyte bit array incurs up to d DRAM cache misses per lookup. Production engines fix this using Kirsch-Mitzenmacher double hashing (deriving d probes from two hash evaluations h1 + i * h2) and cache-line-blocked Bloom filters that confine all d bits to a single 64-byte cache line (trading a slight FPR bump for 1-cache-line lookups).
Second, standard Bloom filters forbid deletion and degrade if overfilled. Clearing a 1 bit back to 0 risks creating a false negative for another inserted key, and exceeding the planned n shifts phi'' below 0.5 irreversibly. Workloads that need deletes use counting Bloom filters (4x memory), Cuckoo filters (which store short fingerprints in two candidate buckets and beat Bloom space below a ~3% false-positive rate), or immutable static structures like Xor and Ribbon filters that pack closer to the information-theoretic log2(1/P) floor.
Third, an approximate filter is only safe when downstream work catches false positives. In Bloom’s dictionary or an LSM-tree SSTable index, a false positive only pays one extra disk seek. By contrast, when teams repurpose filters for deduplication (contrast SimHash near-duplicate detection and training-data deduplication) and discard every item the filter accepts without an exact check, every false positive silently deletes unique data.
For engineers sizing filters today, Bloom’s 1970 math gives a crisp three-step rule: verify that most queries truly miss, pick P just low enough that false positives cost less than true positives, and budget ~1.44 bits per key per bit of -log2 P while respecting cache-line locality on modern hardware.


