Skip to content

deps: bump go-ruby-regexp to the anchored class-run consumer - #3

Merged
tannevaled merged 1 commit into
mainfrom
bump-regexp-skip-opt
Jul 3, 2026
Merged

deps: bump go-ruby-regexp to the anchored class-run consumer#3
tannevaled merged 1 commit into
mainfrom
bump-regexp-skip-opt

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

Bumps the go-ruby-regexp pin so the scanner's skip / match? primitives inherit the new anchored class-run consumer fast path.

What changed

  • go-ruby-regexp/regexp: v0.0.0-20260703193131-c52ca89ccd08 (bounds-only match API) → v0.0.0-20260703203242-ba2d1e459518 (PR #10, fast anchored class-run consumer for the skip primitive).
  • No strscan code change — go.mod / go.sum only. StringScanner already calls the allocation-free bounds-only API (MatchBoundsAt / MatchBounds), so an anchored single-character-class repeat (\s+, \S+, [0-9]+, [A-Za-z0-9_]+, …) is now consumed in one tight loop with no per-byte VM dispatch and no MatchData allocation.

Verification (host: Apple M4 Max, Go 1.26.4)

  • GOWORK=off go build ./..., go vet ./... — clean.
  • GOWORK=off go test -race ./... — pass, 100.0% statement coverage.
  • Benchmark re-measure (see companion docs PR): skip moves from 1.64× slower than YJIT to 2.79× faster; match? from 1.15× slower to 5.08× faster; every op stays byte-identical to MRI.

Squash-merge is appropriate (pin-bump only, no lib code).

🤖 Generated with Claude Code

Bump the go-ruby-regexp pin from the bounds-only match API
(c52ca89ccd08) to ba2d1e459518, which adds a fast anchored class-run
consumer to the regexp VM. StringScanner already calls the
allocation-free bounds-only API (MatchBoundsAt / MatchBounds), so its
skip / match? primitives inherit the fast path with no strscan code
change: an anchored single-character-class repeat (\s+, \S+, [0-9]+,
[A-Za-z0-9_]+, …) is now consumed in one tight loop over the input
bytes with no per-byte VM dispatch and no MatchData allocation.

Output stays byte-identical to MRI on every operation; go test -race
is clean at 100% statement coverage.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@tannevaled
tannevaled merged commit 11231a3 into main Jul 3, 2026
9 checks passed
@tannevaled
tannevaled deleted the bump-regexp-skip-opt branch July 3, 2026 21:06
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.

1 participant