Skip to main content

PROBE_LIMIT

Constant PROBE_LIMIT 

const PROBE_LIMIT: usize = 32;
Expand description

How many resolved views Book::npv will probe linearly before it builds an index instead.

The two costs cross at k ≈ 37 on the sweep in scale-the-book-resolution-table — a probe walks (k+1)/2 entries at ~2.6 ns each, while hashing a seventeen-field RiskFactors costs ~44 ns more than comparing against a one-entry vector. The measurement brackets it: the probe still wins at sixteen keys, the index wins at sixty-four. Set just below the crossing, because the index’s cost past it is bounded and the probe’s is not.