Skip to main content
QUICK REVIEW

[Paper Review] Fully De-Amortized Cuckoo Hashing for Cache-Oblivious Dictionaries and Multimaps

Michael T. Goodrich, Daniel S. Hirschberg|arXiv (Cornell University)|Jul 21, 2011
Algorithms and Data CompressionComputer Science36 references9 citations
TL;DR

This paper presents fully de-amortized cuckoo hashing schemes for cache-oblivious dictionaries and multimaps that achieve worst-case O(1) time complexity for all operations—lookup, insert, delete, and multimap-specific operations—with high or overwhelming probability. The approach uses a nested cuckoo hashing structure with a super-sized auxiliary stash table, enabling negligible failure probability without tuning parameters for block size, memory hierarchy, or failure thresholds.

ABSTRACT

A dictionary (or map) is a key-value store that requires all keys be unique, and a multimap is a key-value store that allows for multiple values to be associated with the same key. We design hashing-based indexing schemes for dictionaries and multimaps that achieve worst-case optimal performance for lookups and updates, with a small or negligible probability the data structure will require a rehash operation, depending on whether we are working in the the external-memory (I/O) model or one of the well-known versions of the Random Access Machine (RAM) model. One of the main features of our constructions is that they are \emph{fully de-amortized}, meaning that their performance bounds hold without one having to tune their constructions with certain performance parameters, such as the constant factors in the exponents of failure probabilities or, in the case of the external-memory model, the size of blocks or cache lines and the size of internal memory (i.e., our external-memory algorithms are cache oblivious). Our solutions are based on a fully de-amortized implementation of cuckoo hashing, which may be of independent interest. This hashing scheme uses two cuckoo hash tables, one "nested" inside the other, with one serving as a primary structure and the other serving as an auxiliary supporting queue/stash structure that is super-sized with respect to traditional auxiliary structures but nevertheless adds negligible storage to our scheme. This auxiliary structure allows the success probability for cuckoo hashing to be very high, which is useful in cryptographic or data-intensive applications.

Motivation & Objective

  • To design fully de-amortized data structures for dictionaries and multimaps that guarantee O(1) worst-case time complexity for all operations.
  • To eliminate the need for performance parameter tuning (e.g., failure probability exponents, block size B, memory size M) in external-memory and RAM models.
  • To achieve high or overwhelming probability guarantees (1 - 1/poly(n) or 1 - 1/n^ω(1)) without pre-specifying constants in failure probability exponents.
  • To support efficient multimap operations such as getAll and removeAll with optimal I/O complexity in external memory.
  • To develop a cache-oblivious solution that performs well across varying memory hierarchies without explicit knowledge of block size B or internal memory size M.

Proposed method

  • Uses a nested cuckoo hashing construction with two tables: an outer cuckoo table and an inner auxiliary table acting as a stash/queue.
  • Employs a rebuilding technique for key-value arrays: when an array becomes half full, a new double-sized array is allocated and elements are copied two at a time during each access.
  • Maintains a crossover index i_A to track the copy progress, ensuring the rebuild completes before the next reallocation is needed.
  • Uses atomic stash mechanisms inspired by Fredman and Willard’s q-heap to support fast, de-amortized operations in the auxiliary structure.
  • Applies the de-amortization technique to both insertions and deletions in the key-value arrays, ensuring worst-case O(1) time per operation.
  • Designs the external-memory version to be cache-oblivious by not hardcoding block size B or memory size M into the algorithm.

Experimental results

Research questions

  • RQ1Can we design a fully de-amortized cuckoo hashing scheme that guarantees O(1) worst-case time for all dictionary and multimap operations without tuning failure probability parameters?
  • RQ2Is it possible to achieve O(1) I/O complexity for external-memory operations in a cache-oblivious manner, independent of block size B or memory size M?
  • RQ3How can we de-amortize array operations in the multimap structure to ensure worst-case O(1) time for add and remove operations?
  • RQ4Can the auxiliary stash in cuckoo hashing be designed to support negligible failure probability without increasing space usage significantly?
  • RQ5Can we support efficient getAll and removeAll operations in external memory with I/O complexity O(1 + n_k/B) without relying on knowledge of B?

Key findings

  • The proposed dictionary construction achieves O(1) worst-case time for all operations (lookup, insert, delete) with high probability in the Practical RAM model.
  • In the external-memory, standard RAM, and AC₀ RAM models, the scheme achieves O(1) worst-case time for all operations with overwhelming probability.
  • The multimap structure supports getAll(k) in O(1 + n_k/B) I/Os and removeAll(k) in O(n_k) I/Os with overwhelming probability, and is fully cache-oblivious.
  • The de-amortization technique ensures that each add(k,v) and remove(k,v) operation completes in O(1) worst-case time by using incremental rebuilding with two-element copying per access.
  • The nested cuckoo hashing structure with a super-sized auxiliary table achieves negligible failure probability without requiring parameter tuning for failure exponents.
  • The scheme uses linear space and supports online operations, with all bounds holding without prior knowledge of the sequence length or performance parameters.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.