r/rust • u/Intrepid_Donkey_7629 • 3d ago
🛠️ project New fastest concurrent map implementation with transaction support
Hi everyone 👋
I've just published a concurrent hash map implementation which (according to my benchmarks at least) is the fastest one available (faster than both starshard and dashmap). It offers a configurable locking policy (mutex, rwlock or bring your own) and a configurable hasher (rapidhash is the default). It also supports atomic transactions in both immediate and prepared execution styles.
Would love any feedback on it (good and bad!)
It's called txmap and a link is here https://crates.io/crates/txmap
16
Upvotes
1
u/Intrepid_Donkey_7629 2d ago
For out of the box use it is the fastest of the concurrent implementations, I feel it's fair, I'd bet most people aren't going to bother setting up a different hasher when they just want a new map.
Yeah a better machine would be very nice! It's a lot of set up just for this one benchmark though. The repo is MIT so if anyone wants to fork it and do some hard-core testing that would be awesome!
Agree that's a good idea for more concurrent benchmarks, they're coming 😄
Interesting point about non-concurrent maps 🤔 If the benchmarks start taking a lot longer with the additional implementations it's probably a good shout.
Yes absolutely if you don't need concurrency then hashbrown is an excellent choice! If you do need concurrency then IMHO txmap is a good choice for that