Time Veloz's direct AVX2 route on folded cells whose complete fold language is byte-equivalent

perfloop-oss/casei · UNCATALOGUED MECHANISM

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

Verdict

VERIFIED · settled 2026-10-22 · merged as tsenart/casei#45

What happened: The assertion is violated on the comparison and satisfied with this change.

Hypothesis

boardEntrant times Veloz through a translating simple-fold view outside its direct ASCII-singleton route. Timing that view where a faster native mode is valid could understate the entrant and flatter casei. This is a comparison-honesty change with no casei speed claim. The native-versus-view timing difference remains unmeasured here.

The submitter reports that since #41 and #42, boardEntrant routes every folded non-ASCII cell for RustAC and Veloz through a simple-fold view that rebuilds the canonical haystack and a per-byte origin map inside each timed call. They report that the complete fold language is implemented exactly by the entrants' unchanged native byte modes on seven pinned folded UTF-8 cells: length/3-4/03, script/ascii/01, case/ci/09, corpus/russian/02, size/1MiB-4MiB/00, op/indexfold/00, and op/indexfold/04. They also report that the certificates and their orbit tests already exist in closed tsenart/casei#43 (case_mtwn2vqphj), superseded only because the views now cover the roster. That history and the complete equivalence report are not independently verified results of this run.

At revision 0fb894708cdc77421001f1540ebeaf896bffce32, the supported operation is BenchmarkBoard, through prepareBoardCell to boardEntrant (arena/board_bench_test.go:37-76,149-197). The Veloz branch excludes exact cells and unavailable AVX2, selects direct only for asciiTier && single, and otherwise constructs the view (328-370). VelozView.Find and Each rebuild the canonical text and origin map per invocation (arena/board/veloz.go:50-112; arena/board/oracle.go:159-177). BenchmarkBoard already emits direct/view mode metrics (arena/board_bench_test.go:42-68). A cell's x_vs_best is casei's time over the fastest supporting entrant's time (scripts/verify_board.py:17-22).

The requested certificate concerns every possible spelling in the pattern's simple-fold language, not merely agreement on the planted haystack. ASCII rune orbits must stay ASCII, and every non-ASCII pattern rune must be fold-invariant; Kelvin-sign and long-s orbits remain uncertified. The frozen Veloz change is single-pattern only. In the reported seven-cell set, script/ascii/01 is pinned with n=2 and therefore remains outside that Veloz guard (arena/board/cells.txt:61); RustAC's routing is context, not an additional requested edit. The other reported cells are pinned at cells.txt:43,93,128,172,196,200.

The active field policy requires honest native dispatch and reporting, while describing the current board-only adaptation rather than widening other consumers (arena/field.yaml:12-40,62-73). This selector uses existing APIs and mode labels and adds no public library operation, type, configuration, or protocol. The current Go mode test and verifier hard-code the ASCII-singleton split (arena/board_bench_test.go:512-568; scripts/verify_board.py:116-122), so they are concrete edit and regression targets.

The Case must independently walk complete unicode.SimpleFold orbits, check native hits and source widths against the original-source orbit oracle, pin the resulting Veloz mode census, and reject certification of every other folded UTF-8 cell. Kelvin-sign, long-s, and a non-ASCII bit-five near-miss are required controls. Any false hit, missed fold spelling, wrong width, unexpected certification, or mismatched mode flag falsifies the selection property. Compare unchanged Veloz direct and view bindings with BenchmarkBoard's paired timing on its verifier's Sapphire Rapids host to confirm or disprove the reported comparison bias, without claiming a casei speed gain. Local validation could not establish these results: the board package lacked casei-rustac pkg-config metadata, and a file-scoped generator probe stopped on the missing pinned leipzig-3200.txt fixture. Regenerate the documented fixtures and check their pinned digests before those checks.

Change to test: In boardEntrant, before falling back to the simple-fold views, certify the complete pattern language: for a single pattern whose ASCII folds stay ASCII and whose non-ASCII runes are fold-invariant, use Veloz's direct AVX2 route. Report these as mode "direct" with the existing veloz_direct_active metrics; keep the views for every other folded cell; keep the Kelvin-sign and long-s orbits uncertified. Pin the certified cells in the Go mode test and in the verifier's expected modes, with a test that no other folded UTF-8 cell is certified and a non-ASCII bit-five near-miss control.

Where it lives

perfloop-oss/casei · arena/board_bench_test.go

Evidence

The assertion is violated on the comparison and satisfied with this change: `For BenchmarkBoard on an AVX2-enabled run over the pinned 200-cell board, Veloz stays direct on its existing ASCII singletons, is absent from exact cells, selects direct for exactly the six pinned folded UTF-8 singletons whose complete Unicode SimpleFold languages are byte-equivalent, and uses the view for every other folded UTF-8 cell; the folded-cell mode census is 15 direct and 97 view, including a view for the two-pattern script/ascii/01 cell. For every SimpleFold spelling of those six patterns and the safe 2-, 3-, and 4-byte controls, direct Find agrees with the board's independent simple-fold oracle on the first hit, and direct Each agrees for every hit on original-source offsets, pattern identity, and byte widths; Kelvin-sign and long-s controls remain views, and direct Veloz does not match U+4E20 when searching for U+4E00.`

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

Timeline