Skip to content

casei: keep Unicode pair confirmation in the VBMI scan - #10

Open
perfloop-agent wants to merge 5 commits into
tsenart:masterfrom
perfloop:perfloop-pr-open-xm07rjajd3
Open

casei: keep Unicode pair confirmation in the VBMI scan#10
perfloop-agent wants to merge 5 commits into
tsenart:masterfrom
perfloop:perfloop-pr-open-xm07rjajd3

Conversation

@perfloop-agent

@perfloop-agent perfloop-agent commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Result

For eligible N=1 Unicode literals, keep pair-pair survivors inside one AVX-512F/BW/VBMI scan and confirm the complete bounded literal before returning to Go. Width-changing or opaque folds, literals that exceed the bounded descriptor, and unsupported hosts keep the decoded path.

The measured false-survivor row moved from losing badly to leading the pinned field:

Metric Before After Paired median change
ns/op 450,578 75,130 -83.3%
x_vs_best 4.547 0.7328 -84.1%

Perfloop measured 10 randomized pairs on BenchmarkBar/multi/multi_N1_unicode_pair_miss_1_5mb. This is targeted evidence, not a complete acceptance run, and it has not been independently reproduced.

Construction

  • Compile bounded width-stable simple-fold forms once in the N=1 plan.
  • Use the existing pair-pair VBMI filter for 64 candidate starts at a time.
  • Confirm surviving starts inside the assembly scan and continue there after a mismatch instead of returning each survivor to decoded Go code.
  • Gate the path on AVX-512F/BW/VBMI and preserve the portable decoded fallback.
  • Add the false-survivor shape to the native-field scoreboard and its transcript verifier.

The current confirmation loop is fused into assembly but is not purely register-resident. Disassembly of the linux/amd64 object at e524403 shows no kernel spills beyond ABI argument/result slots, but the survivor loop reloads the packed descriptor at offsets 0xc9 and 0xca, then form data at offsets 0, 2, 4, 6, 7, and 8. Perfloop classified the stricter register-resident proposal as the same mechanism rather than minting a duplicate Case. An open review on the existing Case now requires that A/B as the next implementation result.

Verified so far

  • GitHub candidate, minimum-Go, portable-arm64, and arena checks.
  • Local go vet ./..., go test ./..., and go test -race ./....
  • 30-second differential FuzzIndexFold run.
  • Baseline-isolation, Rebar preparation, BenchmarkBar transcript, and throughput-verifier tests.
  • The transcript verifier now treats the added row as part of the current 34/34 board; it cannot pass while reporting only the historical 33 rows.
  • NOVELTY.md records the bounded representation, closest known constructions, targeted result, full-board limitation, and falsifiers without claiming a new automaton.
  • Two-reviewer persistent panel: GREEN after the code-cone reduction and the 34/34 reporting correction.

Perfloop prepared the pinned native field with CASEI_PREPARE_ONLY=1, built the arena binary, and co-measured the targeted field row. It did not run the full reproducer acceptance board.

Merge gate

Before merge, run the complete pinned field on both Ice Lake and Sapphire Rapids, require all 34 BenchmarkBar rows below x_vs_best=1.0 with at least two entrants and full-width dispatch, and require wins on all five Unicode-equivalent Rebar rows. Until those receipts exist, this PR is a promising fused-memory control, not proof that the remaining casei gaps are closed.


Perfloop Case: https://app.perfloop.ai/t/oss/case_s8c41a1per

@tsenart

tsenart commented Aug 23, 2026

Copy link
Copy Markdown
Owner

Full hardware acceptance receipt — 2026-08-23

Exact head: 6f3879616c573f866c97e3d2ee0cb5b09a1067c2

The complete pinned native field was rebuilt on both qualifying CPU models with AVX-512F/BW/VBMI. Hyperscan/Vectorscan reported 5.4.12 2026-08-23; every Rebar CSV row was required to have an empty err field. Unicode agreement passed on both hosts.

Host Casei BenchmarkBar Rebar, all 18 performance rows Same-contract Unicode Rebar rows Median casei / best Worst casei / best
Ice Lake, family 6 model 106 34/34 below 1.0 6/18 wins 2/5 wins 1.346× 6.30×
Sapphire Rapids, family 6 model 143 34/34 below 1.0 6/18 wins 2/5 wins 1.425× 6.15×

The five same-contract rows are the two curated Unicode literal rows plus the three Unicode-compatible regexp-capi rows. The separate ASCII-only semantic check is not counted because s and ſ intentionally differ under that contract.

This closes the repository-owned 34-row arena gate but does not close this PRs external-harness gate. The fused confirmation kernel improves the former roughly 9× worst Rebar gap to roughly 6× and improves the overall Ice Lake Rebar board from 4/18 to 6/18, but three equivalent Unicode rows still lose. This PR therefore remains unmergeable under the acceptance rule in its own description.

Corrected receipt digests:

  • Ice Lake: BenchmarkBar 740437449bd833daab644266031a67eb6f30cdf4217458bbf30c0c019856cc4b; Rebar passes 0b95bc0dc0949e6de868aadddf4a97b29b3643b7e2d123d6e02308dce61889ca, 00c672e09a7074c0788846478513204bb0a76a1aaca85e9206629c68f4bf893f, 8071bdb15c9b12acd9f48f9a75978f05bc964cc3b3bcdd63dd8f9f7924f94f46.
  • Sapphire Rapids: BenchmarkBar 8448b3ce1f1a42b79a03ffd67efaa3a20ab5da2be16066c2a8c119343f649cbf; Rebar passes d753596abafcd901d32a2e463ec26e0f150ef1889dc0ea04f85436ac023b4442, 11c97179189e628b2c6fbc64843f00ba7408fadde71f4363853cb21d027e1b49, dfa35e20795bb60d75b549c862c5c69df51f49e1503be7bf26a40c519399af78.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants