deps: bump go-ruby-regexp to the anchored class-run consumer - #3
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bumps the
go-ruby-regexppin so the scanner'sskip/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).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 noMatchDataallocation.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.skipmoves 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