The post discusses the advantages and disadvantages of hashmaps compared to ordered data structures like b-trees. It highlights various benchmark tests on different structures in Rust, Zig, and the author’s own implementation. Surprisingly, hashmaps show slower performance in some cases than b-trees due to the lack of speculative execution. String keys have a significant impact on b-tree performance, especially with common prefixes. The post also delves into optimizations like node size tuning and binary search variants. Wasm hash performance and the lack of fast vector instructions are also briefly discussed.
https://www.scattered-thoughts.net/writing/smolderingly-fast-btrees/