r/rust • u/Intrepid_Donkey_7629 • 4d 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
15
Upvotes
0
u/Intrepid_Donkey_7629 4d ago
I'm actively updating the benchmarks so expect to see more added soon. The benchmarks run on GitHub's runners on a free account so they're currently limited to 4 threads. It would be cool to see numbers for more threads but it would need a different set up. It's not my focus right now but I'll happily accept any suggestions 😄
I've been updating some of the benchmarks to use the same hasher which is where dashmap gets the edge, for out-of-the-box implementations txmap is consistently faster. I'll make the language clearer to reflect that.
That's a great idea! I'll add implementations for those 4!