3 ms·
https://lib.rs/crates/dashmap https://lib.rs/crates/dashmap
by iknowstuff 3y ago
https://lib.rs/crates/dashmap https://lib.rs/crates/dashmap
- ridiculous_fish 3y agoFirst time seeing dashmap, but a cursory inspection shows it works via sharded locks: pub struct DashMap<K, V, S = RandomState> { shift: usize, shards: Box<[RwLock<HashMap<K, V, S>>]>, hasher: S, } so an array of RwLocks. That's quite different than what .NET offers, which is multiple readers and a single writer with NO locks outside of the allocator/GC. I'm not shilling for .NET (I've never written a .NET app) but it does have a really cool hash table.