A Hopscotch hash table is based on open addressing i. Upon collisions, Hopscotch hashing aims to keep key-value pairs close to the original bucket in it's neighborhood. This keeps the chains short and achieves good memory locality. The neighborhood of bucket i are the H consecutive buckets starting in i.
|Published (Last):||15 May 2015|
|PDF File Size:||11.70 Mb|
|ePub File Size:||1.46 Mb|
|Price:||Free* [*Free Regsitration Required]|
We present a new class of resizable sequential and concurrent hash map algorithms directed at both uni-processor and multicore machines. The new hopscotch algorithms are based on a novel hopscotch multi-phased probing and displacement technique that has the flavors of chaining, cuckoo hashing, and linear probing, all put together, yet avoids the limitations and overheads of these former approaches.
The resulting algorithms provide tables with very low synchronization overheads and high cache hit ratios. Moreover, in tests on both Intel and Sun uni-processor machines, a sequential version of hopscotch consistently outperforms the most effective sequential hash table algorithms including cuckoo hashing and bounded linear probing.
This is a preview of subscription content, log in to check access. Cormen, T. Lea, D. Knuth, D. In: Fundamental algorithms, 3rd edn.
Addison Wesley Longman Publishing Co. Pagh, R. Gonnet, G. Addison-Wesley Longman Publishing Co. Shalev, O. Purcell, C. In: Fraigniaud, P. DISC LNCS, vol. Herlihy, M. Brown University Providence 2. Sun Microsystems Burlington 3. Personalised recommendations. Cite paper How to cite? ENW EndNote. Buy options.
This article presents an implementation of a single-threaded hash map using the hopscotch hashing technique. Hopscotch hashing was introduced by Herlihy et al. The algorithm presented in the paper is a multi-threaded hash map with a high throughput. Here we will focus on a single-thread implementation inspired by this paper. The main idea behind the algorithm is the notion of neighborhood.
Donate to arXiv
Hopscotch hashing is a scheme in computer programming for resolving hash collisions of values of hash functions in a table using open addressing. It is also well suited for implementing a concurrent hash table. The algorithm uses a single array of n buckets. For each bucket, its neighborhood is a small collection of H consecutive buckets i. The desired property of the neighborhood is that the cost of finding an item in the buckets of the neighborhood is close to the cost of finding it in the bucket itself for example, by having buckets in the neighborhood fall within the same cache line. The size of the neighborhood must be sufficient to accommodate a logarithmic number of items in the worst case i. If some bucket's neighborhood is filled, the table is resized.