Crates.io | cmap |
lib.rs | cmap |
version | 0.3.0 |
source | src |
created_at | 2021-03-08 16:27:25.932048 |
updated_at | 2021-09-18 16:01:57.153185 |
description | Concurrent multi-writer hash-map using trie |
homepage | |
repository | https://github.com/bnclabs/cmap |
max_upload_size | |
id | 365750 |
size | 480,684 |
Package implement Concurrent hash map.
Quoting from Wikipedia:
A data structure is partially persistent if all versions can be accessed but only the newest version can be modified. The data structure is fully persistent if every version can be both accessed and modified. If there is also a meld or merge operation that can create a new version from two previous versions, the data structure is called confluently persistent. Structures that are not persistent are called ephemeral data structures.
This implementation of hash map cannot be strictly classified into either of the above definition. It supports concurrent writes, using atomic Load, Store and Cas operations under the hood, and does not provide point in time snapshot for transactional operations or iterative operations.
If point in time snapshots are needed refer to ppom package, that implement ordered map with multi-reader concurrency and serialised writes.
key-type
and value-type
.Refer to rustdoc for details.
Machine: Gen-1 Thread-ripper 16/32 cores and 64GB RAM. All measurements use 32-bit key and 64-bit value and U32Hasher from cmap.
With 16 concurrent threads on a 10-million data set, cmap can perform ~12-million get operations.
make build
to confirm all versions of build is passing with
0 warnings and 0 errors.check.sh
with 0 warnings, 0 errors and all testcases passing.perf.sh
with 0 warnings, 0 errors and all testcases passing.cargo spellcheck
to remove common spelling mistakes.