Sixteen Buckets at a Time: The SwissTable in Rust's HashMap
Rust’s HashMap uses a SwissTable with SSE2 group scanning: one movemask compares 16 control bytes at once, and the top 7 bits of the hash act as a filter before any key comparison.
Rust’s HashMap uses a SwissTable with SSE2 group scanning: one movemask compares 16 control bytes at once, and the top 7 bits of the hash act as a filter before any key comparison.