Manuscript Offprint
arXiv:2611.01599Fresh-Priority Eviction for Cuckoo Filters: Exploiting Latent Randomness Under XOR Hashing
Abstract
Cuckoo filters are a widely adopted approximate membership query (AMQ) data structure that supports insertions, lookups, and deletions with low memory overhead. At high load factors, however, insertion performance degrades sharply due to the random-walk eviction process, which may require a large number of element relocations. Recent work on bucketized cuckoo hash tables has shown that fresh-priority eviction, which preferentially evicts elements whose alternate bucket location has not yet been used, achieves total expected evictions for bucket size , an improvement over the standard random walk. In this paper, we show that this technique transfers to cuckoo filters despite their use of XOR-based partial-key hashing. The key insight is that a fresh element's fingerprint, although stored in the table, is not examined by the eviction policy, so when the fingerprint length satisfies , the alternate bucket hash remains a near-uniform random variable, a property we call latent randomness. We prove that under this condition the corruption graph remains subcritical and the total number of evictions is ; we conjecture the tighter bound holds via the full amortized analysis of Bell and Kuszmaul. We further propose encoding the fresh/kicked state implicitly by the element's position within its bucket, requiring no additional per-element metadata. Experimental results on a filter with slots and 8-bit fingerprints demonstrate to fewer evictions at load factors between 94% and 99% for bucket size , and a reduction in cumulative evictions to full capacity.
1 Introduction
Approximate membership query (AMQ) data structures are fundamental building blocks in networking, databases, storage systems, and many other areas of computer science [8, 22]. Given a set , an AMQ structure supports membership queries with a tunable false-positive rate while using substantially less memory than an exact representation. AMQ structures also appear in online caching systems [19], where they help reduce unnecessary computation or data access. The classic Bloom filter [5] has been the dominant AMQ structure for decades, but it has well-known limitations: it does not support deletions, and its cache performance is poor when the number of hash functions is large [28, 20].
The cuckoo filter, introduced by Fan et al. [15], addresses both shortcomings. It stores compact fingerprints in a bucketized cuckoo hash table, supports deletions, and achieves better cache locality by accessing at most two bucket-sized cache lines per query. Cuckoo filters have seen wide adoption in practice [27, 18, 7] and have inspired numerous variants, including resizable filters [32, 30], persistent-memory filters [31], variable-length encoding [11], and novel hash table architectures [29, 14, 4].
However, cuckoo filters share a fundamental challenge with cuckoo hash tables: as the load factor approaches capacity, the insertion procedure relies on a random-walk eviction process that may require many element relocations (“kicks”). In practice, a cap on the maximum number of kicks is imposed (typically 500), and when this cap is reached, the insertion fails. The number of kicks grows rapidly near full capacity, creating a sharp performance cliff that limits the practical load factor. Reducing this insertion overhead is therefore important for data-intensive applications, where memory-efficient data structures must sustain high insertion throughput.
Recently, Bell and Kuszmaul [3] resolved a long-standing open problem on the insertion complexity of bucketized cuckoo hashing. They showed that by preferring to evict fresh elements (those whose alternate bucket location has never been used), the total number of evictions to insert elements into a table with slots and bucket size is in expectation, an improvement over the evictions required by the standard random walk at the optimal load threshold. The key idea is that a fresh element's second hash value is an independent random variable that has not yet influenced any algorithmic decision, so the eviction process explores the hash table uniformly rather than getting trapped in cycles [23, 2].
Challenge: XOR hashing in cuckoo filters. Transferring this technique from cuckoo hash tables to cuckoo filters is not immediate. In a cuckoo hash table, each element has two independent hash values and . In a cuckoo filter, however, the element itself is not stored; only its fingerprint is kept, and the alternate bucket is computed via the XOR-based formula
where HASH is a hash function applied to the fingerprint [15]. Since depends on the stored fingerprint , which in turn depends on , one might worry that the two bucket locations are no longer independent, potentially invalidating the analysis.
Our contribution. We make three contributions:
-
Latent randomness under XOR hashing. We show that the fresh-priority eviction scheme preserves a latent randomness property for cuckoo filters when the fingerprint length satisfies . The crucial observation is that although the fingerprint is stored in the table, it is never examined by the eviction policy, which only checks bucket occupancy and the fresh/kicked status of elements. Therefore, when a fresh element is evicted for the first time, its alternate bucket is a near-uniform random variable over the buckets, and we prove that the corruption graph remains subcritical with total expected evictions (Section 4).
-
Proposed zero-overhead state encoding. We observe that the fresh/kicked state of each element can in principle be encoded implicitly by its position within the bucket: fresh elements are inserted at the front and kicked elements at the back. Eviction scans front-to-back, naturally preferring fresh elements. If the positional invariant is maintained exactly, this requires no additional per-element metadata beyond what a standard cuckoo filter already stores (Section 3). Our experiments use an explicit 1-bit flag per slot to guarantee the exact fresh/kicked distinction; the positional encoding is described as a potential production optimization whose formal equivalence we leave to future work.
-
Experimental validation. We implement and benchmark both the standard random-walk and the fresh-priority eviction schemes for cuckoo filters with bucket sizes . At fine-grained load factors between 94% and 99% with , fresh-priority eviction reduces the average number of kicks per insertion by to , and reduces cumulative total kicks to full capacity by (Section 5).
Organization. Section 2 reviews cuckoo filters and the Bell-Kuszmaul framework. Section 3 presents our fresh-priority eviction scheme. Section 4 provides the theoretical analysis. Section 5 reports experimental results. Section 7 concludes.
2.1 Cuckoo Filters
A cuckoo filter [15] is an AMQ structure that stores a set of elements using a compact bucketized hash table. The table consists of buckets, each of capacity (the bucket size). Each element is represented by a -bit fingerprint , which is a hash of . We assume that is drawn from a pairwise-independent (universal) family of hash functions, independent of the primary hash function .
For each element , two candidate buckets are defined:
where is a hash function and HASH maps fingerprints to bucket indices. The XOR construction ensures that , so the alternate bucket can be computed from the current bucket and the stored fingerprint without knowing the original element . This property is essential for enabling deletions and for the eviction process during insertion.
The fingerprint is stored in exactly one of its two candidate buckets or . A lookup for element checks whether appears in bucket or ; if found, the query returns PROBABLY-IN-SET. A deletion removes the fingerprint from whichever bucket contains it.
The total capacity of the filter is slots. The load factor is the fraction of occupied slots, , where is the number of stored elements. Fan et al. [15] showed that with and bits, a cuckoo filter achieves a false-positive rate below 3% at a load factor of 95%, using less memory per element than a Bloom filter with the same error rate.
2.2 Insertion and Random-Walk Eviction
To insert element , the algorithm first attempts to place in an empty slot of or . If both buckets are full, the algorithm performs random-walk eviction: it picks one of the two buckets, selects a random slot, swaps the incoming fingerprint with the existing one, and moves the evicted fingerprint to its alternate bucket. This process repeats until an empty slot is found or a maximum kick limit is reached.
Let denote the total number of evictions to insert elements. For the standard random-walk policy with bucket size , the expected number of evictions grows superlinearly near the maximum achievable load factor [26, 12, 17]. In practice, this manifests as a sharp increase in per-insertion cost at high load factors, as each new element may trigger a long chain of relocations [21].
2.3 The Bell-Kuszmaul Framework
Bell and Kuszmaul [3] introduced a framework for analyzing the insertion complexity of bucketized cuckoo hashing based on two key concepts:
Latent randomness. Consider a fresh element that has been placed in bucket and has never been evicted. Its second hash value has been computed but has not influenced any algorithmic decision: no insertion, eviction, or bucket-occupancy check has used the value . Therefore, at the moment is first evicted, is effectively an independent, uniformly random value over , regardless of the current state of the table. We call this property latent randomness. It ensures that the eviction of a fresh element always “explores” a truly random part of the table.
Corruption graph. Define the corruption graph on the set of buckets , where an edge is present for each element currently stored in bucket whose alternate bucket is (and vice versa), restricted to elements that have been kicked (i.e., are no longer fresh). The corruption graph tracks the dependencies among heavily loaded buckets. Bell and Kuszmaul showed that if the eviction policy always prefers to evict fresh elements, the corruption graph remains subcritical (all connected components have size ) with high probability, provided the load factor does not exceed , where .
Main result. Under the fresh-priority eviction policy, the total number of evictions to insert elements into a bucketized cuckoo hash table with buckets of size is in expectation [3]. This is optimal up to the factor, since each of the elements may need one relocation. We note that the Bell-Kuszmaul analysis involves specific algorithmic invariants and a detailed exploration-process argument beyond the high-level “prefer fresh” rule; in Section 4 we identify the precise structural properties needed and verify that they hold for cuckoo filters under XOR hashing.
3 Fresh-Priority Eviction for Cuckoo Filters
We now describe how to adapt the fresh-priority eviction scheme to cuckoo filters. The adaptation is surprisingly simple and requires no changes to the filter's data layout.
3.1 Algorithm Overview
Our scheme modifies only the insertion procedure of a standard cuckoo filter. Lookups and deletions remain unchanged. The three rules are:
R1 Fresh insert front-to-back. When a new element is first inserted (it has never been evicted), its fingerprint is placed in the first available slot of its bucket, scanning from slot 0 to slot .
R2 Kicked insert back-to-front. When a previously evicted fingerprint lands in a new bucket, it is placed in the last available slot, scanning from slot to slot 0.
R3 Evict from front. When a bucket is full and an eviction is needed, the algorithm scans the bucket from slot 0 forward and evicts the first fresh element it finds. If no fresh element exists, slot 0 is used as a fallback. When no fresh element exists, the bucket consists entirely of kicked elements; in this case, any eviction adds no new random edge to the corruption graph (Section 4.3), so the choice of victim does not affect subcriticality.
3.2 Position Encodes State
The key observation is that these three rules cause fresh elements to predominantly cluster at the front of each bucket and kicked elements at the back. During an eviction chain of length two or more, a kicked incoming element may temporarily occupy a front slot (Algorithm 1 shifts it to the back to restore the ordering). In the steady state between eviction chains, the front-to-back separation holds, and the front-to-back eviction scan in R3 preferentially selects fresh elements in the vast majority of cases.
In a standard cuckoo filter, each slot stores only the -bit fingerprint. The ordering discipline imposed by R1-R3 causes fresh elements to predominantly cluster at the front, so the front-to-back eviction scan in R3 preferentially selects fresh elements in the vast majority of cases.
Remark 3.1 (Explicit flag vs. positional encoding). Both our theoretical analysis (Section 4) and our experimental evaluation (Section 5) use an explicit 1-bit fresh/kicked flag per slot, which guarantees that every eviction decision correctly distinguishes fresh from kicked elements. The positional encoding described above is a proposed production optimization that would eliminate this per-slot overhead by relying on insertion ordering. However, the positional invariant (fresh elements strictly before kicked elements) may be temporarily violated during eviction chains (see Algorithm 1, lines 10–11 where a kicked element may briefly occupy a front slot). A formal proof that the positional encoding exactly preserves the fresh-priority guarantee under all eviction sequences is nontrivial and is left to future work. The experimental results in this paper validate the benefit of fresh-priority eviction itself, using the explicit flag.
Remark 3.2 (Insertion failure). When the eviction chain reaches the maximum kick limit (MAXKICKS), Algorithm 1 returns FAILURE with the last displaced fingerprint in unplaced. In our implementation, the displaced fingerprint is stored in a stash (a small overflow buffer) to avoid element loss. The experimental metrics (Section 5) count kicks for both successful and failed insertion attempts; the per-insertion averages are computed over successful insertions only, as noted in the text.
Remark 3.3 (Dynamic resizing). Our scheme modifies only the eviction policy and is orthogonal to the filter's resizing mechanism. Integrating fresh-priority eviction with dynamic resizing strategies is an interesting direction for future work, as the resizing procedure must preserve the positional invariants described above.
3.3 Pseudocode
Algorithm 1 gives the complete insertion procedure.
4 Theoretical Analysis
We show that the latent randomness property carries over to cuckoo filters under XOR hashing, establishing that the corruption graph remains subcritical and that the total number of evictions is in expectation.
4.1 Latent Randomness Under XOR Hashing
The cornerstone of the analysis is the latent randomness property: when a fresh element is first evicted, its alternate bucket is a uniformly random, independent hash value. We must verify that this property holds under the XOR-based hashing scheme (3) used by cuckoo filters.
Lemma 4.1 (Latent Randomness for Cuckoo Filters). Consider an insertion-only cuckoo filter with buckets, bucket size , and -bit fingerprints where . Suppose the fingerprint function is drawn from a universal family independent of the bucket hash , and that HASH maps -bit fingerprints to via a function whose image covers all of (which requires , i.e., ). Let be an element that has been placed in bucket and has never been evicted. Then, conditioned on all algorithmic decisions made so far (bucket occupancy, eviction choices, and fresh/kicked status), the alternate bucket is uniformly distributed over .
Proof sketch. The algorithmic decisions that have occurred include: (i) which buckets are full or have vacancies, (ii) which elements were chosen for eviction, and (iii) the fresh/kicked status of each stored element. Crucially, none of these decisions examine the value of . The eviction policy (Algorithm 1) selects victims based on their fresh/kicked status and position within the bucket, not their fingerprint values. Bucket occupancy is determined by whether a slot is empty or non-empty, not by the specific fingerprint stored there.
We note that during insertion of , the algorithm computes and checks whether has an empty slot (Algorithm 1, line 4). This check reveals only whether the bucket is full,
Algorithm 1 Fresh-Priority Insertion for Cuckoo Filters
Require: Element , table of buckets with slots each
Ensure: Each slot stores : a fingerprint and a boolean flag
1: {Compute fingerprint}
2:
3:
4: if has empty slot (front-to-back scan) then
5: Place in first empty slot of
6: return SUCCESS
7: end if
8: if has empty slot (front-to-back scan) then
9: Place in first empty slot of
10: return SUCCESS
11: end if
12: random choice from
13: isFresh TRUE
14: for to MAXKICKS do
15: {Scan front-to-back for first slot with ; fall back to slot 0}
16: victim {Save the victim fingerprint}
17: if isFresh then
18: {R1: fresh element takes the victim's slot}
19: else
20: Shift slots forward by one position (preserving flags)
21: {R2: kicked element goes to back}
22: end if
23: victim
24: isFresh FALSE {Evicted element is now kicked}
25:
26: if has empty slot (back-to-front scan) then
27: Place in last empty slot of
28: return SUCCESS
29: end if
30: end for
31: return FAILURE {Fingerprint in is not placed; see text}
not the value of itself to any future decision, since is placed and marked fresh at this point. For the purpose of the eviction analysis, what matters is that has not influenced any eviction decision at the time is first evicted.
Since has not been examined by any eviction-relevant decision, it remains an independent random variable (drawn from the universal family). The XOR-based alternate bucket is then a bijective function of the unrevealed random value (bijectivity holds because XOR with a fixed value is a bijection). Since HASH is surjective onto when , the alternate bucket is uniformly distributed over , independently of all prior eviction decisions.
This argument applies to the insertion-only workload analyzed in this paper. Extending it to mixed workloads with lookups and deletions would require additional analysis, since lookups compare fingerprint values and deletions remove specific fingerprints.
Remark 4.2. This argument does not hold for the standard random-walk policy. In the standard policy, when an element at position in bucket is evicted, the algorithm reads to compute the alternate bucket. At that point, the fingerprint value has been used, and the element is no longer “fresh” in the latent randomness sense. Our scheme ensures that an element’s fingerprint is only read at the moment of its first eviction, when latent randomness still applies.
4.2 Corruption Graph for Cuckoo Filters
Following the framework of Section 2.3, we define the corruption graph for our setting.
Definition 4.3 (Corruption Graph). Let be the state of the cuckoo filter after a sequence of insertions using fresh-priority eviction. The corruption graph is defined as follows:
-
is the set of buckets.
-
For each element that has been kicked (evicted at least once) and currently resides in bucket , add the edge , i.e., the edge to the alternate bucket of as determined by the XOR formula (3).
The corruption graph captures dependencies between buckets: if two buckets are connected by a path of kicked elements, then evicting an element from one bucket may trigger a chain reaction reaching the other. The key property we need is that this graph remains subcritical.
4.3 Subcriticality
Theorem 4.4 (Subcriticality Under XOR Hashing). Consider an insertion-only cuckoo filter with buckets, bucket size (treated as a constant independent of ), and -bit fingerprints where . Under fresh-priority eviction (Algorithm 1), if the load factor does not exceed where , then with high probability (at least for any constant ), every connected component of the corruption graph has size .
Proof sketch. The proof adapts the structure of the Bell-Kuszmaul analysis [3] to the cuckoo filter setting, with an additional argument to handle fingerprint collisions unique to our setting. We emphasize that the full details of the subcriticality argument rely on the framework developed in [3]; here we establish the key reduction and the additional ingredient needed for cuckoo filters.
Step 1: Reduction to the hash table case. By Lemma 4.1 (which requires ), each fresh element’s alternate bucket is uniformly random and independent, exactly as in the cuckoo hash table setting of [3]. Therefore, when a fresh element is first evicted, the new edge added to the corruption graph has a uniformly random endpoint, satisfying the precondition of the Bell-Kuszmaul subcriticality analysis.
Step 2: Fingerprint collisions. Unlike cuckoo hash tables, cuckoo filters may have fingerprint collisions: two elements in the same bucket with . Such elements necessarily have the same alternate bucket, creating a potential dependency. We bound the impact of these collisions.
Within a bucket of size , the expected number of fingerprint collision pairs is at most . Over all buckets, the expected total number of collision-affected elements is at most . Since is a constant and , we have collision-affected elements in expectation. By Markov’s inequality, with high probability the number of such elements is .
Crucially, elements involved in fingerprint collisions do not introduce genuinely new connections between buckets: if and both reside in bucket , then both have the same alternate bucket . The collision edge is therefore a parallel edge duplicating the connection already established by either or individually. Parallel edges increase edge multiplicity but do not enlarge the set of reachable buckets in any connected component.
Step 3: Component size bound. Steps 1 and 2 establish that the corruption graph’s edge structure, excluding the parallel edges from fingerprint collisions, satisfies the same distributional properties as in the hash table setting of [3]: each edge added by a fresh eviction has a uniformly random endpoint. The Bell-Kuszmaul analysis [3] shows that under the load threshold , such a graph is subcritical with all components of size . Adding parallel edges does not change the component structure.
4.4 Total Eviction Bound
Theorem 4.5 (Total Evictions). Under the conditions of Theorem 4.4, the expected total number of evictions to insert elements into a cuckoo filter with buckets and bucket size is , provided .
Proof sketch. Each insertion that triggers evictions explores a path in the cuckoo graph. With fresh-priority eviction, each eviction step either:
(a) evicts a fresh element, adding a random edge to the corruption graph, or
(b) traverses an existing edge of the corruption graph.
Since each connected component of the corruption graph has size (Theorem 4.4), the eviction chain traverses at most existing edges before either finding an empty slot or evicting another fresh element. Each fresh eviction “charges” work to the newly added random edge.
The total number of edges ever added to the corruption graph is at most the total number of fresh elements evicted, which is at most (each element is evicted from fresh status at most once). Each edge contributes evictions. Summing over all edges and accounting for the factor from bucket processing yields total evictions.
Remark 4.6 (Towards an bound). For cuckoo hash tables, Bell and Kuszmaul [3] obtain the tighter bound by showing that the expected length of the longest corruption-graph path through a random bucket is , which avoids the traversal cost. We conjecture that the same amortization applies to our cuckoo filter setting, since by Lemma 4.1 and Theorem 4.4 the corruption graph has the same distributional properties. A full proof would require verifying that all steps of the amortization argument in [3] carry over; we leave this to future work.
Corollary 4.7. Fresh-priority eviction achieves an asymptotic improvement over random-walk eviction for cuckoo filters. The standard random walk requires total evictions at the optimal load threshold, while fresh-priority eviction requires .
Remark 4.8 (Theory-experiment gap). The theoretical results above require so that the fingerprint hash can cover all buckets uniformly. In our experiments (Section 5), we use bits and buckets (for ), so . Under these parameters, the alternate bucket can take at most 256 distinct offsets from , far fewer than . The theoretical guarantee of Lemma 4.1 does not formally apply to this regime. Nevertheless, the experimental results show that fresh-priority eviction provides substantial practical improvements even with short fingerprints. We interpret this as evidence that the latent randomness mechanism is robust: even partial randomness in the alternate bucket suffices to improve eviction performance in practice. Closing the gap between theory () and practice () is an important open question.
5 Experimental Evaluation
We evaluate the fresh-priority eviction scheme on a cuckoo filter implementation and compare it against the standard random-walk eviction policy.
5.1 Setup
We implemented both the standard and improved cuckoo filter variants in C++. The key parameters are:
-
Total slots: 4,194,304 (= 2²²) for all configurations.
-
Bucket sizes: , giving and buckets respectively.
-
Fingerprint size: bits.
-
Maximum kicks: 500.
-
Hash function: MurmurHash-style 64-bit mixing.
-
XOR alternate bucket: .
The “Standard” variant uses uniform random slot selection for eviction. The “Improved” (fresh-priority) variant uses Algorithm 1 with an explicit fresh boolean flag per slot for precise measurement.
Elements are inserted sequentially as 64-bit integers starting from 0, using a fixed random seed for reproducibility. Preliminary tests with a small number of alternative seeds showed consistent trends, though we report results for a single seed and defer a full multi-seed statistical analysis to future work. We measure the average number of kicks per successful insertion at each load factor.
5.2 Coarse-Grained Results
Table 1 shows the average kicks per insertion at 5% load-factor intervals for bucket sizes and .
Table 1: Average kicks per insertion at 5% load-factor intervals.¹
| Load% | ||||
|---|---|---|---|---|
| Standard | Improved | Standard | Improved | |
| 75 | 0.42 | 0.41 | 0.12 | 0.13 |
| 80 | 0.74 | 0.70 | 0.24 | 0.26 |
| 85 | 1.40 | 1.24 | 0.49 | 0.54 |
| 90 | 3.13 | 2.32 | 1.08 | 1.13 |
| 95 | 10.97 | 6.12 | 3.08 | 2.62 |
| 100 | 89.80 | 73.15 | 39.62 | 21.31 |
At moderate load factors (), both methods perform similarly because most insertions find empty slots without eviction. The improvement becomes pronounced at high load factors (), where the eviction process dominates the insertion cost. For at 100% load, the fresh-priority scheme achieves a reduction in average kicks.²
¹Each row in Table 1 reports the average kicks per insertion over all elements inserted in the preceding 5% load-factor band (e.g., the 95% row averages over insertions from 90% to 95% load). In contrast, Tables 2 and 3 report point-wise averages over each 1% band. This explains the apparent discrepancy at , 95% load: the coarse value (3.08 / 2.62) is an average over the 90–95% range, while the fine-grained value (4.86 / 3.73) reflects only the 94–95% band where eviction costs are highest.
²All reported averages are over successful insertions. At 100% load with , both methods encounter occasional insertion failures (reaching the 500-kick cap), which are excluded from the per-insertion average. The improvement ratio at 100% for () is lower than at 95% () because at very high loads both methods encounter frequent failures, and the relative advantage becomes unstable (see Table 3).
5.3 Fine-Grained Results
To better characterize the improvement near maximum capacity, we measured at 1% intervals for load factors between 90% and 100%.
Table 2: Fine-grained comparison for .
| Load% | Standard | Improved | Ratio |
|---|---|---|---|
| 90 | 1.08 | 1.13 | 1.0× |
| 91 | 1.83 | 1.79 | 1.0× |
| 92 | 2.25 | 2.06 | 1.1× |
| 93 | 2.82 | 2.51 | 1.1× |
| 94 | 3.64 | 3.01 | 1.2× |
| 95 | 4.86 | 3.73 | 1.3× |
| 96 | 6.73 | 4.79 | 1.4× |
| 97 | 10.18 | 6.38 | 1.6× |
| 98 | 18.05 | 9.51 | 1.9× |
| 99 | 45.03 | 19.09 | 2.4× |
Table 3: Fine-grained comparison for .³
| Load% | Standard | Improved | Ratio |
|---|---|---|---|
| 90 | 3.13 | 2.32 | 1.3× |
| 91 | 5.49 | 3.62 | 1.5× |
| 92 | 7.01 | 4.30 | 1.6× |
| 93 | 9.42 | 5.37 | 1.8× |
| 94 | 13.16 | 7.07 | 1.9× |
| 95 | 19.77 | 10.27 | 1.9× |
| 96 | 35.00 | 26.29 | 1.3× |
| 97 | 79.27 | 96.13 | 0.8× |
| 98 | 152.43 | 107.54 | 1.4× |
| 99 | 142.65 | 95.13 | 1.5× |
The improvement ratio grows monotonically with the load factor for , reaching at 99% load (Table 2). Table 3 shows the corresponding results for . The improvement ratio peaks at near 95% load; however, above 96% the per-band ratios become volatile as insertion failures grow rapidly. At 97%, the improved method's failure rate exceeds the standard method's, and the per-successful-insertion average temporarily reverses. Despite this, the cumulative picture remains favorable: the large gains in the 90–95% range outweigh the losses at extreme loads. This behavior highlights that the latent randomness advantage is most reliable when the table is heavily loaded but not yet near saturation.
5.4 Cumulative Total Kicks
Table 4 reports the cumulative total number of kicks to reach selected load factors for .
The cumulative improvement becomes positive at approximately 94% load and reaches at full capacity, demonstrating that the fresh-priority scheme's modest per-insertion overhead
³At load factors above 95% for , insertion failures (500-kick cap) become significant: at 97% load, the improved method records 11,237 failures versus 467 for the standard method in a batch of insertions. Since the reported averages count only successful insertions, the per-band ratios at these extreme loads are strongly influenced by the differing failure rates.
Table 4: Cumulative total kicks for ( slots).
| Load% | Standard | Improved | Ratio |
|---|---|---|---|
| 95 | 1,071,060 | 1,007,245 | |
| 99 | 4,424,949 | 2,675,326 | |
| 100 | 8,935,953 | 5,160,372 |
at low loads is more than compensated by the substantial reduction in eviction chain length at high loads.
5.5 Discussion
Several observations emerge from the experimental results:
Bucket size matters. The improvement is most pronounced for , which provides a good balance between the latent randomness benefit and the baseline eviction cost. For , the baseline is already relatively expensive (fewer slots per bucket means more frequent evictions), and while the improvement peaks at near 95% load, it becomes unreliable above 96% as insertion failures escalate rapidly. We expect that larger bucket sizes would reduce the baseline eviction cost further, leaving less room for improvement, though we have not evaluated in this study.
Threshold behavior. The improvement becomes significant at load factors above 93% to 94% for . Below this threshold, most insertions succeed without any evictions, and the eviction policy is irrelevant. This is consistent with the theoretical prediction that the corruption graph begins to grow only when the load factor approaches .
Low-load behavior. At load factors below 90%, both schemes have comparable performance. For at loads , the relative difference is within 6%; at 85% the improved scheme already shows an 11% reduction, indicating the benefit begins earlier for smaller bucket sizes. For , the improved scheme incurs a small overhead of 4% to 9% at low load, likely due to the deterministic scan order reducing the chance of finding an immediate empty slot. This overhead is negligible relative to the to improvements at high load.
6 Related Work
Approximate membership queries. The Bloom filter [5] is the classic AMQ structure, with numerous variants optimizing for cache efficiency [28], counting [6, 10], compression [24], and theoretical guarantees [9, 25]. The quotient filter [4, 27] and XOR filter [18] are alternatives that offer different space-time trade-offs. Kirsch and Mitzenmacher [20] showed that only two hash functions are needed for optimal Bloom filter performance. Recent surveys [8, 22] provide comprehensive overviews of AMQ structures and their applications.
Cuckoo filters and variants. Fan et al. [15] introduced cuckoo filters and demonstrated their practical advantages over Bloom filters. Eppstein [14] provided a simplified analysis of their space utilization. Morton filters [7] improve cache efficiency through biasing and compression.
Cuckoo hashing theory. Pagh and Rodler [26] introduced cuckoo hashing. Subsequent work analyzed its load thresholds [12, 16, 17, 13], multiple-way variants [21], and backyard extensions [1]. The connection to balanced allocations and the power of two choices [2, 23] provides the theoretical foundation for understanding cuckoo hashing load factors. Bell and Kuszmaul [3] resolved the open problem of polynomial-time insertion at optimal load for bucketized cuckoo hashing.
7 Conclusion
We have shown that the fresh-priority eviction technique transfers to cuckoo filters despite their use of XOR-based partial-key hashing. The key theoretical insight is that the fingerprint of a fresh element, while stored in the table, is not examined by the eviction policy, preserving the latent randomness property when the fingerprint length satisfies . Under this condition, we proved that the corruption graph remains subcritical and that the total number of evictions is , with the tighter bound conjectured via the full Bell-Kuszmaul amortization argument. Experiments with -bit fingerprints, which fall outside the formal theoretical regime, nonetheless demonstrate consistent improvements of to in eviction count at high load factors with bucket size , suggesting that the latent randomness mechanism is robust in practice.
Future directions include: (i) closing the theoretical gap between and the practically important regime; (ii) proving the conjectured bound; (iii) formally establishing the equivalence of positional encoding and explicit flags; (iv) extending the analysis to counting cuckoo filters [15, 6]; and (v) combining fresh-priority eviction with other optimizations such as cache-aware bucket layouts [7].
References
[1] Yuriy Arbitman, Moni Naor, and Gil Segev. Backyard cuckoo hashing: Constant worst-case operations with a succinct representation. In Proceedings of the 2010 IEEE 51st Annual Symposium on Foundations of Computer Science, pages 787–796, 2010. URL: https://doi.org/10.1109/FOCS.2010.80.
[2] Yossi Azar, Andrei Z. Broder, Anna R. Karlin, and Eli Upfal. Balanced allocations. SIAM Journal on Computing, 29(1):180–200, 1999. URL: https://doi.org/10.1137/S0097539795288490.
[3] Tolson Bell and William Kuszmaul. Fast insertion for bucketized cuckoo hashing. CoRR, abs/2607.24545(1):1–50, 2026. URL: https://doi.org/10.48550/arXiv.2607.24545.
[4] Michael A. Bender, Martin Farach-Colton, Rob Johnson, Russell Kraner, Bradley C. Kuszmaul, Dzejla Medjedovic, Pablo Montes, Pradeep Shetty, Richard P. Spillane, and Erez Zadok. Don’t thrash: How to cache your hash on flash. Proceedings of the VLDB Endowment, 5(11):1627–1637, 2012. URL: https://doi.org/10.14778/2350229.2350275.
[5] Burton H. Bloom. Space/time trade-offs in hash coding with allowable errors. Communications of the ACM, 13(7):422–426, 1970. URL: https://doi.org/10.1145/362686.362692.
[6] Flavio Bonomi, Michael Mitzenmacher, Rina Panigrahy, Sushil Singh, and George Varghese. An improved construction for counting Bloom filters. In Proceedings of the 14th Annual European Symposium on Algorithms, pages 684–695, 2006. URL: https://doi.org/10.1007/11841036_61.
[7] Alexander Dodd Breslow and Nuwan Jayasena. Morton filters: Faster, space-efficient cuckoo filters via biasing, compression, and decoupled logical sparsity. Proceedings of the VLDB Endowment, 11(9):1041–1055, 2018. URL: https://doi.org/10.14778/3213880.3213884.
[8] Andrei Z. Broder and Michael Mitzenmacher. Network applications of Bloom filters: A survey. Internet Mathematics, 1(4):485–509, 2004. URL: https://doi.org/10.1080/15427951.2004.10129096.
[9] Larry Carter and Mark N. Wegman. Universal classes of hash functions. Journal of Computer and System Sciences, 18(2):143–154, 1979. URL: https://doi.org/10.1016/0022-0000(79)90044-8.
[10] Saar Cohen and Yossi Matias. Spectral Bloom filters. In Proceedings of the 2003 ACM SIGMOD International Conference on Management of Data, pages 241–252, 2003. URL: https://doi.org/10.1145/872757.872787.
[11] Haipeng Dai, Hancheng Wang, Zhipeng Chen, Jiaqi Zheng, Meng Li, Rong Gu, Chen Tian, and Wanchun Dou. Variable-length encoding framework: A generic framework for enhancing the accuracy of approximate membership queries. In Proceedings of the 2023 IEEE International Conference on Data Mining, pages 61–70, 2023. URL: https://doi.org/10.1109/ICDM58522.2023.00015.
[12] Luc Devroye and Pat Morin. Cuckoo hashing: Further analysis. Information Processing Letters, 86(4):215–219, 2003. URL: https://doi.org/10.1016/S0020-0190(02)00500-8.
[13] Martin Dietzfelbinger and Christoph Weidling. Balanced allocation and dictionaries with tightly packed constant size bins. Theoretical Computer Science, 380(1-2):47–68, 2007. URL: https://doi.org/10.1016/j.tcs.2007.02.054.
[14] David Eppstein. Cuckoo filter: Simplification and analysis. In Proceedings of the 15th Scandinavian Symposium and Workshops on Algorithm Theory, pages 8:1–8:12, 2016. URL: https://doi.org/10.4230/LIPIcs.SWAT.2016.8.
[15] Bin Fan, David G. Andersen, Michael Kaminsky, and Michael Mitzenmacher. Cuckoo filter: Practically better than Bloom. In Proceedings of the 10th ACM International on Conference on emerging Networking Experiments and Technologies, pages 75–88, 2014. URL: https://doi.org/10.1145/2674005.2674994.
[16] Dimitris Fotakis, Rasmus Pagh, Peter Sanders, and Paul G. Spirakis. Space efficient hash tables with worst case constant access time. Theory of Computing Systems, 38(2):229–248, 2005. URL: https://doi.org/10.1007/s00224-004-1195-x.
[17] Alan M. Frieze and Päll Melsted. Maximum matchings in random bipartite graphs and the space utilization of cuckoo hash tables. Random Structures & Algorithms, 41(3):334–364, 2012. URL: https://doi.org/10.1002/rsa.20427.
[18] Thomas Mueller Graf and Daniel Lemire. Xor filters: Faster and smaller than Bloom and cuckoo filters. Journal of Experimental Algorithms, 25(1):1–16, 2020. URL: https://doi.org/10.1145/3376122.
[19] Rong Gu, Simian Li, Haipeng Dai, Hancheng Wang, Yili Luo, Bin Fan, Ran Ben Basat, Ke Wang, Zhenyu Song, Shouwei Chen, Beinan Wang, Yihua Huang, and Guihai Chen. Adaptive online cache capacity optimization via lightweight working set size estimation at scale. In Proceedings of the 2023 USENIX Annual Technical Conference, pages 467–484, 2023. URL: https://www.usenix.org/conference/atc23/presentation/gu.
[20] Adam Kirsch and Michael Mitzenmacher. Less hashing, same performance: Building a better Bloom filter. Random Structures & Algorithms, 33(2):187–218, 2008. URL: https://doi.org/10.1002/rsa.20208.
[21] Eric P. Lehman and Rina Panigrahy. 3.5-way cuckoo hashing for the price of 2-and-a-bit. In Proceedings of the 17th Annual European Symposium on Algorithms, pages 671–681, 2009. URL: https://doi.org/10.1007/978-3-642-04128-0_60.
[22] Lailong Luo, Deke Guo, Richard T. B. Ma, Ori Rottenstreich, and Xueshan Luo. Optimizing Bloom filter: Challenges, solutions, and comparisons. IEEE Communications Surveys & Tutorials, 21(2):1912–1949, 2019. URL: https://doi.org/10.1109/COMST.2018.2889329.
[23] Michael Mitzenmacher. The power of two choices in randomized load balancing. IEEE Transactions on Parallel and Distributed Systems, 12(10):1094–1104, 2001. URL: https://doi.org/10.1109/71.963420.
[24] Michael Mitzenmacher. Compressed Bloom filters. IEEE/ACM Transactions on Networking, 10(5):604–612, 2002. URL: https://doi.org/10.1109/TNET.2002.803864.
[25] Michael Mitzenmacher and Salil P. Vadhan. Why simple hash functions work: Exploiting the entropy in a data stream. In Proceedings of the Nineteenth Annual ACM-SIAM Symposium on Discrete Algorithms, pages 746–755, 2008. URL: https://dl.acm.org/doi/10.5555/1347082.1347164.
[26] Rasmus Pagh and Flemming Friche Rodler. Cuckoo hashing. Journal of Algorithms, 51(2):122–144, 2004. URL: https://doi.org/10.1016/j.jalgor.2003.12.002.
[27] Prashant Pandey, Michael A. Bender, Rob Johnson, and Rob Patro. A general-purpose counting filter: Making every bit count. In Proceedings of the 2017 ACM International Conference on Management of Data, pages 775–787, 2017. URL: https://doi.org/10.1145/3035918.3035963.
[28] Felix Putze, Peter Sanders, and Johannes Singler. Cache-, hash- and space-efficient Bloom filters. In Proceedings of the 6th International Workshop on Experimental Algorithms, pages 108–121, 2007. URL: https://doi.org/10.1007/978-3-540-72845-0_9.
[29] Hancheng Wang, Haipeng Dai, Shusen Chen, and Guihai Chen. Rethinking hash tables: Challenges and opportunities with Compute Express Link (CXL). In Proceedings of the ACM Turing Award Celebration Conference - China 2024, pages 23–27, 2024. URL: https://doi.org/10.1145/3674399.3674418.
[30] Hancheng Wang, Haipeng Dai, Shusen Chen, Meng Li, Rong Gu, Huayi Chai, Jiaqi Zheng, Zhiyuan Chen, Shuaituan Li, Xianjun Deng, and Guihai Chen. Bamboo filters: Make resizing smooth and adaptive. IEEE/ACM Transactions on Networking, 32(5):3776–3791, 2024. URL: https://doi.org/10.1109/TNET.2024.3403997.
[31] Hancheng Wang, Haipeng Dai, Rong Gu, Youyou Lu, Jiaqi Zheng, Jingsong Dai, Shusen Chen, Zhiyuan Chen, Shuaituan Li, and Guihai Chen. Wormhole filters: Caching your hash on persistent memory. In Proceedings of the Nineteenth European Conference on Computer Systems, pages 456–471, 2024. URL: https://doi.org/10.1145/3627703.3629590.
[32] Hancheng Wang, Haipeng Dai, Meng Li, Jun Yu, Rong Gu, Jiaqi Zheng, and Guihai Chen. Bamboo filters: Make resizing smooth. In Proceedings of the 2022 IEEE 38th International Conference on Data Engineering, pages 979–991, 2022. URL: https://doi.org/10.1109/ICDE53745.2022.00078.