xacrimon / dashmap

Blazing fast concurrent HashMap for Rust.
MIT License
2.99k stars 145 forks source link

Does Dashmap Re-Size Itself ? #296

Open borgben opened 7 months ago

borgben commented 7 months ago

Does Dashmap behave like a normal hash table, resizing itself and re-hashing its keys after entries exceed a certain threshold?

I spent some time digging around the code-base but if this happens I couldn't find where. Any pointers as to whether Dashmap behaves this way and if so where this is being handled within the code base would be greatly appreciated.

Imberflur commented 3 months ago

Looking at https://docs.rs/dashmap/5.5.3/src/dashmap/lib.rs.html#88-92, data is broken into shards that each act like a normal hashmap. Afaict, the number of shards itself doesn't change and is set when creating the dashmap.