A dictionary implementation based on dynamic perfect hashing

  • Authors:
  • Martin Dietzfelbinger;Martin Hühne;Christoph Weidling

  • Affiliations:
  • Technische Universität Ilmenau, Germany;Fachhochschule Südwestfalen, Iserlohn, Germany;DocuWare AG, Germering, Germany

  • Venue:
  • Journal of Experimental Algorithmics (JEA)
  • Year:
  • 2008

Quantified Score

Hi-index 0.01

Visualization

Abstract

We describe experimental results on an implementation of a dynamic dictionary. The basis of our implementation is “dynamic perfect hashing” as described by Dietzfelbinger et al. (SIAM J. Computing 23, 1994, pp. 738--761), an extension of the storage scheme proposed by Fredman et al. (J. ACM 31, 1984, pp. 538--544). At the top level, a hash function is used to partition the keys to be stored into several sets. On the second level, there is a perfect hash function for each of these sets. This technique guarantees O(1) worst-case time for lookup and expected O(1) amortized time for insertion and deletion, while only linear space is required. We study the practical performance of dynamic perfect hashing and describe improvements of the basic scheme. The focus is on the choice of the hash function (both for integer and string keys), on the efficiency of rehashing, on the handling of small buckets, and on the space requirements of the implementation.