Skip to main content

intersect

Function intersect 

Source
pub fn intersect(
    index: &IdListIndex<'_>,
    keys: &[u32],
    scratch: &mut IntersectScratch,
    out: &mut Vec<FactId>,
)
Expand description

Intersects the sorted lists of keys into out (ascending ids).

Starts from the shortest list (fewest candidates) and filters it against the others by merge — cost is O(shortest + Σ walked prefixes). An absent key means an empty list, so the intersection is empty; an empty keys slice yields an empty result (the caller treats “no tag filter” as “no allow-set”, not as “allow everything”).