| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
DataFrame.Internal.HashTable
Description
Documentation
An open-addressing linear-probe table. htMask is capacity - 1 (capacity
is a power of two) and maps a hash to its home slot.
newHashTable :: PrimMonad m => Int -> m (HashTable (PrimState m)) Source #
Allocate an empty table able to hold up to n distinct groups while
keeping the load factor under ~0.5 (capacity = nextPow2Above (2*n)). All
group slots start empty (-1).
nextPow2Above :: Int -> Int Source #
Smallest power of two strictly greater than n, at least 2. Sizes the
table so the load factor stays below ~0.5 even when every row is a distinct
group.