https://github.com/poonai/skipmap
rust based insert only concurrent skipmap
https://github.com/poonai/skipmap
Last synced: 4 months ago
JSON representation
rust based insert only concurrent skipmap
- Host: GitHub
- URL: https://github.com/poonai/skipmap
- Owner: poonai
- Created: 2018-10-08T15:00:20.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-10-09T04:39:07.000Z (over 6 years ago)
- Last Synced: 2025-02-13T00:49:57.801Z (4 months ago)
- Language: Rust
- Homepage:
- Size: 6.84 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Concurrent SkipMap
Thread safe insert only concurrent skipmap.
All the reference movement of the nodes are done through atomic instruction.
# Notes
- No Update
- No Delete
- Used features `allocator_api`, `rustc_private`# Benchmarks
```
test insert ... bench: 2,187,023 ns/iter (+/- 70,591)
test insert_concurrent ... bench: 1,494,069 ns/iter (+/- 164,952)```
# Reference
- badger (go key value database, which is of RocksDB)
- https://gitlab.com/boats/skiplist/tree/master/src/skiplist# Usage
```rust
let skip_map: SkipMap = SkipMap::new();
skip_map.insert(String::from("a"), String::from("1"));
skip_map.insert(String::from("b"), String::from("2"))
assert_eq!(skip_map.get(&String::from("a")).expect("expected 1"), "1");
```