Crates.io | seckoo |
lib.rs | seckoo |
version | 0.0.0-alpha2.1 |
source | src |
created_at | 2023-03-08 03:12:16.718657 |
updated_at | 2023-03-20 02:46:30.94731 |
description | A concurrent Cuckoo Hash Table |
homepage | https://docs.rs/seckoo |
repository | https://github.com/emilHof/seckoo |
max_upload_size | |
id | 804174 |
size | 28,002 |
A concurrent Cuckoo Hash Table.
Currently Seckoo's CuckooHash
is limited to a Single-Writer-Multi-Reader setup where keys and values both must implement Copy
along with the usual Hash
and Eq
trait for keys. This is likely to change in the future, so that any key that implements Hash + Eq
may be used.
Seckoo is also a fixed-capacity hash table, but this could also change in future iterations.
This crate and its API is thus still quite unstable and should be used with caution!
insert
currently allows for multiple equal keys to exist in the table at the same time. Fix this!
*mut Bucket<K, V>
would reduce the minimum allocation size, as the bucket array/Vec
would be smaller.Bucket<K, V>
to AtomicPointer<Bucket<K, V>>
crossbeam_epoch::Epoch
).Entry<'c, K, V, ...>
type to give concurrent access to keys.WriteGuard<'c, K, V, ...>
as it should not be needed anymorelen(&self) -> usize
get_or_insert(&self, key: K, f: impl FnOnce() -> V) -> Entry<'c, K, V, ...>;
get_cloned(&self, key: &K) -> Option<V> where V: Clone;
contains(&self, key: &K) -> bool;
const
generics to give users ability to choose.Hasher
for the first index and the second Hasher
to create a tag. We can then tag our pointers to make comparison easier, and use the tag XOR
'd with the first hash to get the second index.