def key_idxs

mylsm-lsm-store@0.6.0.1 · src/Sstable.bend:290

import mylsm-lsm-store@0.6.0.1/src/Sstable.bend as Sstable
import Base

290# --- Hybrid bloom (spike): parallel index collection, sequential assembly ---
291# Phase 1 emits a flat index list (two per key); joins concatenate, so no
292# chunk tree or union is ever built. Phase 2 folds the indexes into ONE tree
293# on the CPU. This removes the tree-allocation amplification that costs ~10%
294# at 1M scale in the chunk+union design, while keeping a fork tree that a
295# future `!` can ship once the GPU recovery crash is fixed upstream.
296# Both bit positions of one key as a flat two-element list.
297def key_idxs(+key: String, +size: Nat) -> List<&2, Nat>:
298  Con{bhash_n(key, 17, size), Con{bhash_n(key, 257, size), Nil{}}}

Uses (4)

Used by (2)