[Paper Review] Separate Chaining Meets Compact Hashing
This paper introduces a novel compact hash table that combines separate chaining with compact hashing to eliminate the need for displacement information typically required in space-efficient hash tables. By storing keys and values separately in dynamically resized buckets and using an injective transform to compactly represent keys, the method achieves low memory usage during construction and faster insertions than prior compact hash tables, especially with large satellite data.
While separate chaining is a common strategy for resolving collisions in a hash table taught in most textbooks, compact hashing is a less common technique for saving space when hashing integers whose domain is relatively small with respect to the problem size. It is widely believed that hash tables waste a considerable amount of memory, as they either leave allocated space untouched (open addressing) or store additional pointers (separate chaining). For the former, Cleary introduced the compact hashing technique that stores only a part of a key to save space. However, as can be seen by the line of research focusing on compact hash tables with open addressing, there is additional information, called displacement, required for restoring a key. There are several representations of this displacement information with different space and time trade-offs. In this article, we introduce a separate chaining hash table that applies the compact hashing technique without the need for the displacement information. Practical evaluations reveal that insertions in this hash table are faster or use less space than all previously known compact hash tables on modern computer architectures when storing sufficiently large satellite data.
Motivation & Objective
- To address the memory inefficiency of traditional separate chaining hash tables that use excessive space due to pointers and dynamic allocation.
- To eliminate the need for displacement information in compact hash tables, which is typically required in open addressing schemes to reconstruct keys.
- To improve insertion performance and memory efficiency in compact hash tables, especially when handling large satellite data.
- To explore the feasibility of using separate chaining with compact hashing as a competitive alternative to open addressing in memory-constrained applications.
- To evaluate the trade-offs between memory usage, construction speed, and lookup performance in a new compact hash table design.
Proposed method
- The hash table uses separate chaining with dynamic arrays for buckets, storing keys and values in separate, equally sized arrays to improve data locality.
- An injective function maps keys to pairs of integers (quotient and remainder), where the quotient is stored in a compact bit-packed array, and the remainder is derived from the hash function.
- A threshold $ b_{ ext{max}} $ controls bucket size; when exceeded, the table is resized to double the number of buckets, with elements migrated bucket-by-bucket to reduce peak memory usage.
- The method avoids storing displacement data by relying on the injective transform and compact representation, eliminating the need for extra metadata used in traditional compact hashing.
- Cache line optimization is achieved by tuning $ b_{ ext{max}} $ so that buckets fit within a single cache line, improving performance through spatial locality.
- The design leverages bit-parallel operations and SIMD-like techniques to accelerate quotient searches in the compact bit array, reducing lookup time overhead.
Experimental results
Research questions
- RQ1Can separate chaining be made memory-efficient without relying on displacement information, as required in open addressing compact hash tables?
- RQ2Does combining separate chaining with compact hashing lead to faster insertions and lower memory usage compared to existing compact hash table designs?
- RQ3How does the performance of the proposed hash table compare to state-of-the-art compact hash tables in terms of memory footprint and construction speed?
- RQ4To what extent can cache line alignment and separate key-value storage improve performance in compact hash tables?
- RQ5Can the proposed design be extended to support more advanced structures like bucketized Cuckoo hashing with improved load balancing and memory efficiency?
Key findings
- The proposed hash table achieves faster insertions and lower memory usage during construction than all previously known compact hash tables on modern architectures when storing large satellite data.
- The method eliminates the need for displacement data, simplifying the data structure and reducing memory overhead compared to traditional compact hashing techniques.
- Resizing is performed incrementally bucket-by-bucket, reducing peak memory usage compared to traditional dynamic arrays that reserve space for $3m$ elements during resize.
- The design supports efficient lookup by storing keys and values in separate arrays, improving data locality and enabling optimization via cache line alignment.
- The use of bit-parallel operations on compactly stored quotients enables faster search within buckets, accelerating the lookup process despite larger bucket sizes.
- Theoretical analysis shows that with a default load factor of $\alpha = 0.5$, the average number of collisions per insertion is bounded by $c_\alpha \leq 3$, supporting efficient insertion performance.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.