| JCSE, vol. 16, no. 4, pp.194-198, 2022 DOI:  http://dx.doi.org/10.5626/JCSE.2022.16.4.194 Utilizing Temporal Locality for Hash Tables with Circular Chaining  Changwoo Pyo and Taehwan KimDepartment of Computer Engineering, Hongik University, Seoul, Korea
Ultrasound Division, Siemens Healthineers Ltd., Koreal, Korea
 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. Keyword: 
                                                  Bucket structure; Circular chaining; Hash table; Linear chaining; Locality; Temporal locality interval
                                                 Full Paper:  158 Downloads, 1078 View |