Cuckoo hashing

  • Authors:
  • Rasmus Pagh;Flemming Friche Rodler

  • Affiliations:
  • IT University of Copenhagen, Rued Langgaardsvej 7, 2300 Køhenhavn S, Denmark;ON-AIR A/S, Digtervejen 9, 9200 Aalborg SV, Denmark

  • Venue:
  • Journal of Algorithms
  • Year:
  • 2004

Quantified Score

Hi-index 0.00

Visualization

Abstract

We present a simple dictionary with worst case constant lookup time, equaling the theoretical performance of the classic dynamic perfect hashing scheme of Dietzfelbinger et al. [SIAM J. Comput. 23 (4) (1994) 738-761]. The space usage is similar to that of binary search trees. Besides being conceptually much simpler than previous dynamic dictionaries with worst case constant lookup time, our data structure is interesting in that it does not use perfect hashing, but rather a variant of open addressing where keys can be moved back in their probe sequences. An implementation inspired by our algorithm, but using weaker hash functions, is found to be quite practical. It is competitive with the best known dictionaries having an average case (but no nontrivial worst case) guarantee on lookup time.