MultiTable: A Faster Hash Table at any Physical Load Factor up to and Including One
Abstract
We present \emph{multitable} and its Rust reference implementation: a stable hash table both materially faster at equal physical memory and more flexible than the SwissTable in its Rust's hashbrown implementation. As an arithmetic mean over 84 configurations it delivers hashbrown's throughput when both hash the same raw bytes and when hashbrown is keyed on native integers, its best case; on negative lookups alone, and . Multitable reaches \textbf{any physical load factor} up to and \textbf{including one} ( demonstrated), exactly for the requested capacity, compared to hashbrown which doubles at for 4-byte keys and values. At saturation of hashbrown (assumed average case of its rigid ladder) and multitable sized to physical load factor, hashbrown takes more space. The lookup probe count has no cliff as the load factor approaches one. Bucket size, physical load factor, and failure budget are parameters, and the multitable can be grown without rehashing. We implement two variants of multitable: plain and filtered. At equal physical memory on an Apple M2 Pro the filtered multitable leads hashbrown in all insert, hit, and miss configurations. Multitable is more \textbf{memory-efficient}, at equal mixed-lookup throughput on the map of -byte keys and values the filtered multitable needs up to fewer bytes than hashbrown, and the plain multitable is smaller, holding more keys in the same memory.
Create a lesson
Metadata
- Categories
- cs.CR, cs.DS, math.CO, math.PR
Related papers
Intelligent Event-Safe Cyber-Physical Attack Detection and Localization in Critical Water Infrastructure: A Cross-Dataset Study of SWaT and WADI
Shared title terminologycs.CRVictor Kebande
Copied and Perturbed: A String-Based Likelihood-Ratio Membership Inference Attack on LLM In-Context Table Synthesis
Shared title terminologycs.CRJoshua Ward, Haoyuan Cheng, Yue Zhang et al.
Prism Tables: Improving Time-Memory Tradeoffs for Function Inversion
Shared title terminologycs.CRMoni Naor, Michael Sieradzki
CHAMP: Cayley HAshing with Matrix Products
Shared title terminologycs.CRAlexander Demin, Alexey Ovchinnikov, Vladimir Shpilrain
Protocol Integration of Physical Layer Deception into EAP-TEAP Wi-Fi Authentication
Shared title terminologycs.CRMoustafa Ibrahim, Bin Han, Hans D. Schotten
LogiC-Diff: Embedding Security Properties Into AI-Enabled Cyber-Physical Systems
Shared title terminologycs.CRZiyan An, John Stankovic, Meiyi Ma