xacrimon / dashmap

Blazing fast concurrent HashMap for Rust.
MIT License
2.84k stars 140 forks source link

Replace internal hashtable with hashbrown RawTable #287

Closed arthurprs closed 2 weeks ago

arthurprs commented 8 months ago

Replace internal hashtable with hashbrown RawTable.

Benefits

The first two can be significant performance improvements in some circumstances.

Sadly, this is a breaking change for raw-api users so it'll require a major version bump.

Maybe the third time is the charm :smile:

conradludgate commented 3 weeks ago

A potentially nicer setup could be to use the new HashTable API instead of RawTable. I put together a WIP of that in this commit https://github.com/conradludgate/dashmap/commit/3023a51babdb37fb08252b25a0d7dc1c1ae846d8.

arthurprs commented 3 weeks ago

The downside with Hashtable is still has all the lifetimes and that doesn't play well with dashmap lock wrappers. Meaning we keep having to transmute lifetimes at every corner with change_lifetime_const, etc..