Stream seven-name root counts on Sapphire Rapids

perfloop-oss/casei · INEFFICIENT ALGORITHM

https://perfloop.ai/t/oss/case_2yyp5rs9pd

Verdict

VERIFIED · settled 2026-10-07

What happened: The paired measurements met the required improvement.

Hypothesis

Make the complete seven-name Sherlock span count faster on Sapphire Rapids by admitting its compiled root candidates to the existing iterator. This is traversal only. Complete word certificates remain a separate prerequisite for closing the large field gap.

The required operation is imported/sherlock/name-alt3-casei over all594933 bytes of the pinned Sherlock fixture, with ordered Sherlock|Holmes|Watson|Irene|Adler|John|Baker and total4593 source bytes. A retained Matcher enumerates all non-overlapping matches. At the pin rootBucketEachFilter rejects more than five patterns. After the owned compiler change, the route can use the same complete bucket/Shufti screen and exact matchAtStart fallback.

case_0t04tgewvq/cand_q7bevzacn4 Verification records compiler-only broadening, official352981.5→135204 ns/op, and expressly leaves seven-name Each outside the four/five iterator. Do not count compiler work as traversal. Integrate that exact prerequisite first, then broaden only iterator admission; do not require new certificates to make the selector change correct.

A prerequisite-layered full-operation profile attributes37.23% flat/88.80% cumulative CPU to findFiltered and48.11% flat to the bucket kernel. Four alternating stage controls measured131121.5→99022.5 ns for iterator-only, paired24.71% improvement. Certificate expansion alone was neutral at131722.5 because traversal remained outside the selector. Three-name controls were likewise neutral for the upper-bound-only change.

The pristine-pin seven-name ratio was approximately6.895, requiring85.50% total removal. Iterator-only cannot close it. The compiler, iterator, separate certificate-range and screen composition reached an exploratory ratio below1.0, with each conditional increment counted once. The screen's frozen two-row Case is not automatically given new Sherlock proof scope. This proposal adds no public API or certificate representation and retains all complete-plan guards under AGENTS.md:141–158.

After the owned seven-name compiler prerequisite, extending the guarded root iterator through six–eight patterns removes material suffix-search work while retaining exact trie confirmation for plans without certificates.

After integrating the exact owned compiler prerequisite, co-measure iterator-only baseline/Candidate on the complete required seven-name repository operation, with certificate range unchanged. Require repeatable ns/op improvement and independent exact ordered match/ID/width agreement with total4593. Reject this implementation for neutral/slower time, incorrect candidate order, missing earlier/lowest-ID match, wrong width or exact-fallback failure. Exercise six–eight count boundaries, incomplete/overflow buckets, high bytes, malformed inputs, prefix ties, callback stop and short tails. Preserve three-name and existing four/five-pattern operations and other Rebar guards without slowdown, every existing BenchmarkBar field win and semantic/feature-off tests.

The stage timings and profiles are executed disposable prerequisite-layered Research evidence, not pristine-pin or official Case runs. The iterator-only experiment retained exact trie confirmation and independently improved seven names, resolving the prior bundled scope failure. It did not extend certificate authority. The prior compiler's full38-row proof remains pending as stated in its Verification. Broader selector source coverage through eight is not claimed to be measured benefiting workload coverage beyond this seven-name row.

Change to test: On Sapphire Rapids, extend the existing guarded complete-root Each iterator's upper pattern-count limit through eight after the owned bucket compiler prerequisite. Retain existing exact trie confirmation for candidates without complete certificates and leave certificate compilation/decoding unchanged.

Where it lives

perfloop-oss/casei · audit/rebar/runner/main.go

Evidence

Rebar imported/sherlock/name-alt3-casei count-spans over the pinned Sherlock corpus with one retained seven-pattern Matcher on Sapphire Rapids model 143 · 10 sample pairs

metric baseline candidate paired median change confidence range required result
ns/op 133965 96121 −28.3% (−37863) −38883 to −37168 < −6698 PASSED
MB/s 4441 6189 +39.6% (+1757) +1719 to +1786 ≥ −222 PASSED

Rebar imported/sherlock/name-alt5-casei three-pattern count-spans guard over the pinned Sherlock corpus with a retained Matcher on Sapphire Rapids model 143 · 10 sample pairs

metric baseline candidate paired median change confidence range required result
ns/op 123737 124005 +0.1% (+73.5) −1211 to +573 ≤ 6187 PASSED
MB/s 4808 4798 −0.1% (−2.85) −22.2 to +46.19 ≥ −240.4 PASSED

Rebar imported/leipzig/tom-sawyer-huckle-fin-insensitive four-pattern count guard over the pinned Leipzig fixture with a retained Matcher on Sapphire Rapids model 143 · 10 sample pairs

metric baseline candidate paired median change confidence range required result
ns/op 1654727 1679417 +0.9% (+14239) −1517 to +57449 ≤ 82736 PASSED
MB/s 9678 9535 −0.9% (−82.53) −318.8 to +8.55 ≥ −483.9 PASSED

Rebar curated/02-literal-alternate/sherlock-casei-en five-pattern English count guard over the pinned subtitle fixture with a retained Matcher on Sapphire Rapids model 143 · 10 sample pairs

metric baseline candidate paired median change confidence range required result
ns/op 108461 108684 +0.3% (+341.5) −1234 to +3044 ≤ 5423 PASSED
MB/s 8291 8274 −0.3% (−26.08) −226.4 to +92.72 ≥ −414.5 PASSED

Rebar curated/02-literal-alternate/sherlock-casei-ru five-pattern count guard over the pinned subtitle fixture with a retained Matcher on Sapphire Rapids model 143 · 10 sample pairs

metric baseline candidate paired median change confidence range required result
ns/op 510735 511739 −0.1% (−270) −9236 to +11710 ≤ 25537 PASSED
MB/s 3075 3069 +0.1% (+1.6) −69.6 to +55.97 ≥ −153.8 PASSED

BenchmarkBar 38-row all-wins field guard against the pinned native field on Sapphire Rapids model 143 · 10 sample pairs

metric baseline candidate paired median change confidence range required result
field_win_multi_multi_N1_unicode_pair_miss_1_5mb 1 1 0 0 to 0 ≥ 0 PASSED
field_win_multi_multi_N2_miss_log_1mb 1 1 0 0 to 0 ≥ 0 PASSED
field_win_multi_multi_N512_miss_hazard_64kb 1 1 0 0 to 0 ≥ 0 PASSED
field_win_multi_multi_N512_miss_log_64kb 1 1 0 0 to 0 ≥ 0 PASSED
field_win_multi_multi_N5_raw_transition_late_hit_5mb 1 1 0 0 to 0 ≥ 0 PASSED
field_win_multi_multi_N5_raw_transition_miss_5mb 1 1 0 0 to 0 ≥ 0 PASSED
field_win_multi_multi_N64_miss_log_64kb 1 1 0 0 to 0 ≥ 0 PASSED
field_win_multi_multi_N64_miss_ru_64kb 1 1 0 0 to 0 ≥ 0 PASSED
field_win_multi_multi_N8_hazard_hit_1mb 1 1 0 0 to 0 ≥ 0 PASSED
field_win_multi_multi_N8_hit_log_1mb 1 1 0 0 to 0 ≥ 0 PASSED
field_win_multi_multi_N8_miss_hazard_1mb 1 1 0 0 to 0 ≥ 0 PASSED
field_win_multi_multi_N8_miss_log_1mb 1 1 0 0 to 0 ≥ 0 PASSED
field_win_multi_multi_N8_miss_ru_1mb 1 1 0 0 to 0 ≥ 0 PASSED
field_win_multi_multi_forms4_complete_triple_miss_1mb 1 1 0 0 to 0 ≥ 0 PASSED
field_win_multi_multi_forms8_complete_triple_near_miss_64kb 1 1 0 0 to 0 ≥ 0 PASSED
field_win_single_code_hit_brackets_256kb 1 1 0 0 to 0 ≥ 0 PASSED
field_win_single_code_miss_256kb 1 1 0 0 to 0 ≥ 0 PASSED
field_win_single_kelvin_hazard_1mb 1 1 0 0 to 0 ≥ 0 PASSED
field_win_single_latency_match_end_1kb 1 1 0 0 to 0 ≥ 0 PASSED
field_win_single_latency_match_mid_1kb 1 1 0 0 to 0 ≥ 0 PASSED
field_win_single_latency_match_start_1kb 1 1 0 0 to 0 ≥ 0 PASSED
field_win_single_latency_miss_1kb 1 1 0 0 to 0 ≥ 0 PASSED
field_win_single_log_hit_sparse_1mb 1 1 0 0 to 0 ≥ 0 PASSED
field_win_single_log_miss_1kb 1 1 0 0 to 0 ≥ 0 PASSED
field_win_single_log_miss_1mb 1 1 0 0 to 0 ≥ 0 PASSED
field_win_single_log_miss_64kb 1 1 0 0 to 0 ≥ 0 PASSED
field_win_single_log_needle16_64kb 1 1 0 0 to 0 ≥ 0 PASSED
field_win_single_log_needle32_64kb 1 1 0 0 to 0 ≥ 0 PASSED
field_win_single_log_needle3_64kb 1 1 0 0 to 0 ≥ 0 PASSED
field_win_single_log_needle8_64kb 1 1 0 0 to 0 ≥ 0 PASSED
field_win_single_periodic_miss_64kb 1 1 0 0 to 0 ≥ 0 PASSED
field_win_single_prose_hit_dense_1mb 1 1 0 0 to 0 ≥ 0 PASSED
field_win_single_prose_miss_1mb 1 1 0 0 to 0 ≥ 0 PASSED
field_win_single_ru_hit_sparse_1mb 1 1 0 0 to 0 ≥ 0 PASSED
field_win_single_ru_latency_miss_1kb 1 1 0 0 to 0 ≥ 0 PASSED
field_win_single_ru_miss_1mb 1 1 0 0 to 0 ≥ 0 PASSED
field_win_single_samechar_miss_64kb 1 1 0 0 to 0 ≥ 0 PASSED
field_win_single_torture_miss_64kb 1 1 0 0 to 0 ≥ 0 PASSED

Checks: 12 of 12 passed. Verification: no defect found.

Timeline