• Marek Vavrusa's avatar
    Hopscotch hashing for resolving collisions in RRL. · 674c7fab
    Marek Vavrusa authored
    The idea is to insert colliding items in the H distance of
    the original hash value. H must be chosen to accomodate log(N)
    items, we use sizeof(unsigned). Unlike in linear probing,
    lookup is always in constant time and doesn't require
    extra memory and chaining costs as in external chaining.
    Extra memory is just sizeof(unsigned) per bucket.
    Builtin __builtin_ctz() is used for fast hop lookup.
    
    Herlihy, Maurice and Shavit, Nir and Tzafrir, Moran (2008).
    "Hopscotch Hashing". DISC '08: Proceedings of the 22nd
    international symposium on Distributed Computing.
    Arcachon, France: Springer-Verlag. pp. 350--364.
    http://people.csail.mit.edu/shanir/publications/disc2008_submission_98.pdf
    674c7fab