Linear Probing Revisited: Tombstones Mark the Demise of Primary Clustering
Michael A. Bender, Bradley C. Kuszmaul, William Kuszmaul
Abstract
The linear-probing hash table is one of the oldest and most widely used data structures in computer science. However, linear probing famously comes with a major draw-back: as soon as the hash table reaches a high memory utilization, elements within the hash table begin to cluster together, causing insertions to become slow. This phenomenon, now known as primary clustering, was first captured by Donald Knuth in 1963; at a load factor of, the expected time per insertion is, rather than the more desirable. We show that there is more to the story than the classic analysis would seem to suggest. It turns out that small design decisions in how deletions are implemented have dramatic effects on the asymptotic performance of insertions. If these design decisions are made correctly, then even a hash table that is continuously at a load factorcan achieve average insertion time. A key insight is that the tombstones left behind by deletions cause a surprisingly strong “anti-clustering” effect, and that when insertions and deletions are one-for-one, the anti-clustering effects of deletions actually overpower the clustering effects of insertions. We also present a new variant of linear probing, which we call graveyard hashing, that completely eliminates primary clustering on any sequence of operations. If, when an operation is performed, the current load factor isfor some, then the expected cost of the operation is. One corollary is that, in the external-memory model with a data block size of, graveyard hashing offers the following remarkable guarantee: at any load factorsatisfying, graveyard hashing achievesexpected block transfers per operation. Past external-memory hash tables have only been able to offer aguarantee when the block sizeis at least. Our results come with actionable lessons for both theoreticians and practitioners, in particular, that well-designed use of tombstones can completely change the asymptotic landscape of how the linear probing behaves (and if there are no deletions).
Ask about this paper
Ask your agent about it.
Lune has read the top-tier papers around this one, so every answer names the papers it rests on.
Your agent calls
Lunesearch_papers
Free to start. No credit card required.
Terminal
Install the CLIlune papers get d772feff-e9f0-4775-a76d-fee960628683Cited by top-tier papers6
- Locally Uniform HashingIoana O. Bercea, Lorenzo Beretta, Jonas Klausen, Jakob Bæk Tejs Houen et al.FOCS 2023 · 4 citations
- DLHT: A Non-blocking Resizable Hashtable with Fast Deletes and Memory-awarenessAntonios Katsarakis, Vasilis Gavrielatos, Nikos NtarmosHPDC 2024 · 3 citations
- Tight Bounds for Classical Open AddressingMichael A. Bender, William Kuszmaul, Renfei ZhouFOCS 2024 · 2 citations
- Zombie Hashing: Reanimating Tombstones in GraveyardYuvaraj Chesetti, Benwei Shi, Jeff M. Phillips, Prashant PandeySIGMOD 2025 · 2 citations
- Tight Analyses of Ordered and Unordered Linear ProbingMark Braverman, William KuszmaulFOCS 2024 · 1 citation
Related papers
- Optimal Non-oblivious Open AddressingMichael A. Bender, William Kuszmaul, Renfei ZhouSTOC 2025 · 1 citation
- On the optimal time/space tradeoff for hash tablesMichael A. Bender, Martin Farach-Colton, John Kuszmaul, William Kuszmaul et al.STOC 2022 · 20 citations
- Optimal Bounds for Open Addressing Without ReorderingMartín Farach-Colton, Andrew Krapivin, William KuszmaulFOCS 2024 · 3 citations
- Greedy Open Addressing Revisited: Beyond Yao's Lower BoundMartín Farach-Colton, Andrew Krapivin, William KuszmaulSTOC 2026 · 2 citations
- Flushing Without CascadesMichael A. Bender, Rathish Das, Martin Farach-Colton, Rob Johnson et al.SODA 2020 · 8 citations
