De-amortized Cuckoo Hashing: Provable Worst-Case Performance and Experimental Results

Cuckoo hashing is a highly practical dynamic dictionary: it provides amortized constant insertion time, worst case constant deletion time and lookup time, and good memory utilization. However, with a noticeable probability during the insertion of n elements some insertion requires *** (logn ) time. Whereas such an amortized guarantee may be suitable for some applications, in other applications (such as high-performance routing) this is highly undesirable. Kirsch and Mitzenmacher (Allerton '07) proposed a de-amortization of cuckoo hashing using queueing techniques that preserve its attractive properties. They demonstrated a significant improvement to the worst case performance of cuckoo hashing via experimental results, but left open the problem of constructing a scheme with provable properties. In this work we present a de-amortization of cuckoo hashing that provably guarantees constant worst case operations. Specifically, for any sequence of polynomially many operations, with overwhelming probability over the randomness of the initialization phase, each operation is performed in constant time. In addition, we present a general approach for proving that the performance guarantees are preserved when using hash functions with limited independence instead of truly random hash functions. Our approach relies on a recent result of Braverman (CCC '09) showing that poly-logarithmic independence fools AC 0 circuits, and may find additional applications in various similar settings. Our theoretical analysis and experimental results indicate that the scheme is highly efficient, and provides a practical alternative to the only other known approach for constructing dynamic dictionaries with such worst case guarantees, due to Dietzfelbinger and Meyer auf der Heide (ICALP '90).

[1]  Adi Shamir,et al.  Cache Attacks and Countermeasures: The Case of AES , 2006, CT-RSA.

[2]  Michael Mitzenmacher,et al.  Using a Queue to De-amortize Cuckoo Hashing in Hardware , 2007 .

[3]  Alan Siegel,et al.  On universal classes of fast high performance hash functions, their time-space tradeoff, and their applications , 1989, 30th Annual Symposium on Foundations of Computer Science.

[4]  Rasmus Pagh,et al.  Cuckoo Hashing , 2001, Encyclopedia of Algorithms.

[5]  Mark Braverman Poly-logarithmic Independence Fools AC0 Circuits , 2009, Computational Complexity Conference.

[6]  Louay Bazzi,et al.  Polylogarithmic Independence Can Fool DNF Formulas , 2007, 48th Annual IEEE Symposium on Foundations of Computer Science (FOCS'07).

[7]  Paul C. Kocher,et al.  Timing Attacks on Implementations of Diffie-Hellman, RSA, DSS, and Other Systems , 1996, CRYPTO.

[8]  Michael Mitzenmacher,et al.  More Robust Hashing: Cuckoo Hashing with a Stash , 2008, ESA.

[9]  Alan M. Frieze,et al.  Random graphs , 2006, SODA '06.

[10]  Daniel M. Kane,et al.  Bounded Independence Fools Degree-2 Threshold Functions , 2010, 2010 IEEE 51st Annual Symposium on Foundations of Computer Science.

[11]  Svante Janson,et al.  Random graphs , 2000, ZOR Methods Model. Oper. Res..

[12]  Friedhelm Meyer auf der Heide,et al.  Dynamic perfect hashing: upper and lower bounds , 1988, [Proceedings 1988] 29th Annual Symposium on Foundations of Computer Science.

[13]  Anna Pagh,et al.  Uniform hashing in constant time and linear space , 2003, STOC '03.

[14]  Peter Bro Miltersen Cell probe complexity-a survey , 1999 .

[15]  Paul G. Spirakis,et al.  Space Efficient Hash Tables with Worst Case Constant Access Time , 2003, Theory of Computing Systems.

[16]  Luc Devroye,et al.  Two-Way Chaining with Reassignment , 2005, SIAM J. Comput..

[17]  Béla Bollobás,et al.  Random Graphs , 1985 .

[18]  Marcin Zukowski,et al.  Architecture-conscious hashing , 2006, DaMoN '06.

[19]  Bowen Alpern,et al.  A model for hierarchical memory , 1987, STOC.

[20]  Friedhelm Meyer auf der Heide,et al.  A New Universal Class of Hash Functions and Dynamic Hashing in Real Time , 1990, ICALP.

[21]  Mark Braverman,et al.  Poly-logarithmic Independence Fools AC^0 Circuits , 2009, 2009 24th Annual IEEE Conference on Computational Complexity.

[22]  Rajamani Sundar A lower bound for the dictionary problem under a hashing model , 1991, [1991] Proceedings 32nd Annual Symposium of Foundations of Computer Science.

[23]  Moni Naor,et al.  History-Independent Cuckoo Hashing , 2008, ICALP.

[24]  Martin Dietzfelbinger,et al.  Almost random graphs with simple hash functions , 2003, STOC '03.

[25]  Rina Panigrahy,et al.  Efficient hashing with lookups in two memory accesses , 2004, SODA '05.

[26]  Linda Torczon,et al.  An efficient representation for sparse sets , 1993, LOPL.

[27]  Friedhelm Meyer auf der Heide,et al.  De Dictionariis Dynamicis Pauco Spatio Utentibus (lat. On Dynamic Dictionaries Using Little Space) , 2006, LATIN.

[28]  Andrei Z. Broder,et al.  Using multiple hash functions to improve IP lookups , 2001, Proceedings IEEE INFOCOM 2001. Conference on Computer Communications. Twentieth Annual Joint Conference of the IEEE Computer and Communications Society (Cat. No.01CH37213).

[29]  Larry Carter,et al.  Universal Classes of Hash Functions , 1979, J. Comput. Syst. Sci..

[30]  Friedhelm Meyer auf der Heide,et al.  Dynamic Perfect Hashing: Upper and Lower Bounds , 1994, SIAM J. Comput..

[31]  Martin Dietzfelbinger,et al.  Balanced allocation and dictionaries with tightly packed constant size bins , 2005, Theor. Comput. Sci..

[32]  Jeffrey F. Naughton,et al.  Clocked adversaries for hashing , 1993, Algorithmica.

[33]  Martin Dietzfelbinger,et al.  On risks of using cuckoo hashing with simple universal hash classes , 2009, SODA.

[34]  Alexander A. Razborov A Simple Proof of Bazzi’s Theorem , 2009, TOCT.

[35]  Kai-Min Chung,et al.  Why simple hash functions work: exploiting the entropy in a data stream , 2008, SODA '08.

[36]  Kenneth A. Ross Efficient Hash Probes on Modern Processors , 2007, 2007 IEEE 23rd International Conference on Data Engineering.