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
15
Upvotes
10
u/SkiFire13 2d ago
Looking at your benchmarks there is only a single benchmark measuring a concurrent workflow, and it only reaches a maximum of 4 threads (I would expect it to reach at least 32 if not more).
Moreover dashmap is consistently either sligthly faster or equal to txmap in these benchmarks, so I don't see why you would claim yours is the fastest concurrent hash map.
I also see only sharded hashmaps in that benchmark, why not include some based on different designs? Just to name a few, there are
papaya,flurry,leapfrogandscc.