Skip to content

Select the special string candidate by its first character - #571

Merged
tompng merged 1 commit into
ruby:masterfrom
tompng:parse_special_string_switch
Nov 10, 2026
Merged

tompng merged 1 commit into
ruby:masterfrom
tompng:parse_special_string_switch

Conversation

@tompng

@tompng tompng commented Nov 9, 2026

Copy link
Copy Markdown
Member

The fast path added in #565 switches on the first character only to skip the table, so the first characters are listed separately from the table entries. Pick the candidate string in that switch instead of looping over the table, so at most one strncmp is done.

The fast path added in ruby#565 switches on the first character only to
skip the table, so the first characters are listed separately from the
table entries. Pick the candidate string in that switch instead of
looping over the table, so at most one strncmp is done.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tompng
tompng merged commit bbecef0 into ruby:master Nov 10, 2026
83 checks passed
@tompng
tompng deleted the parse_special_string_switch branch November 10, 2026 17:39
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