Abstract

A hash table with separate chaining typically adopts linearly linked lists as buckets to resolve collisions. This study demonstrates that converting bucket structures from linear to circular chaining enables buckets to utilize temporal locality and improve search performance. Unlike linear chaining, circular chaining can track the most recently accessed entry and preserve the reachability of all bucket entries without complicated data structures and operations. We defined temporal locality interval (TLI) to represent the period during which subsequent bucket access repeats itself on a single entry. We analyzed the average search cost using the TLI length and load factor. The average search cost converges to the minimum when the TLI length dominates the load factor. In our experiments using the SPEC CPU 2006 benchmark suite, circular chaining manifested 1.14 comparisons, reducing the cost of linear chaining by 45.71% when the load factor was 0.99. The improvement is notable, particularly for tables with a high load factor and uneven distribution of bucket sizes.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call