opthash 0.10.0

Rust implementations of Elastic Hashing and Funnel Hashing
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/// `SwissTable` control-byte group width; SIMD scans operate one group at a time.
pub(crate) const GROUP_SIZE: usize = 16;
/// First-allocation slot count when a map grows from empty.
pub(crate) const INITIAL_CAPACITY: usize = 16;
/// Default headroom: `max_insertions = capacity * (1 - reserve_fraction)`.
pub(crate) const DEFAULT_RESERVE_FRACTION: f64 = 0.10;
/// Lower clamp for `sanitize_reserve_fraction`.
pub(crate) const MIN_RESERVE_FRACTION: f64 = 1e-6;
/// Upper clamp for `sanitize_reserve_fraction`.
pub(crate) const MAX_RESERVE_FRACTION: f64 = 0.999_999;
/// Upper bound on `FunnelHashMap`'s `reserve_fraction`; level capacities become
/// unstable beyond this load factor.
pub(crate) const MAX_FUNNEL_RESERVE_FRACTION: f64 = 1.0 / 8.0;
/// Control-byte region alignment. 64 = cache-line size, so the first group
/// is line-aligned and groups pack 4-per-line without straddling.
pub(crate) const CONTROL_ALIGN: usize = 64;