Skip to main content

MERGE_NEXT_CHAIN_LIMIT

Constant MERGE_NEXT_CHAIN_LIMIT 

Source
pub const MERGE_NEXT_CHAIN_LIMIT: usize = 50;
Expand description

How many same-prefix Next() advances the merge walks chain before paying one Seek() to finish the variant chain.

Under merge_default_graph every counted triple must skip its remaining G-variants and older versions. A Seek() repositions every level of the iterator stack (measured ~500ns on the benchmark CF) while a Next() only advances the current winner (~15-40ns), so a chain of up to MERGE_NEXT_CHAIN_LIMIT - 1 same-prefix rows is walked with Next() alone; a chain still continuing at the limit — a triple asserted in dozens of named graphs, or a hot triple with a long un-GC’d version chain — pays one Seek() past the remainder, at exactly the old unconditional-seek cost plus the bounded chain of Next() calls.