pub struct EntropyMapLookup { /* private fields */ }Expand description
Wrapper around entropy-map’s MapWithDict for u32 -> u8 lookups
Implementations§
Source§impl EntropyMapLookup
impl EntropyMapLookup
Sourcepub fn new(entries: &[(u32, u8)]) -> (Self, u64)
pub fn new(entries: &[(u32, u8)]) -> (Self, u64)
Create a new entropy map from key-value pairs Returns the map and construction time in nanoseconds
Sourcepub fn lookup_batch(&self, keys: &[u32], results: &mut [u8])
pub fn lookup_batch(&self, keys: &[u32], results: &mut [u8])
Lookup multiple values at once
Sourcepub fn memory_usage(&self) -> usize
pub fn memory_usage(&self) -> usize
Get memory usage information