Concurrent HashMap for Rust
This library provides a concurrent hash map implementation similar to Go's sync.Map
, with additional performance optimizations for the get
function.
Features
- Concurrency: Safe concurrent access using fine-grained locking.
- Performance: Optimized
get
function for faster reads. - API Compatibility: Supports all functions provided by Go's
sync.Map
.
Usage
Getting Started
// create a new hashmap
let mp: = new;
// set the value for key
mp.store;
mp.store;
mp.store;
// get value by key
let v = mp.load
// delete the value for a key.
m.delete
Benchmark
License
hashmap
source code is available under the GPL License.