Skip to content

Remove unnecessary conditional in escape_UTF8_char_basic.#795

Merged
byroot merged 1 commit into
ruby:masterfrom
samyron:sm/remove-unnecessary-conditional
Apr 29, 2025
Merged

Remove unnecessary conditional in escape_UTF8_char_basic.#795
byroot merged 1 commit into
ruby:masterfrom
samyron:sm/remove-unnecessary-conditional

Conversation

@samyron
Copy link
Copy Markdown
Contributor

@samyron samyron commented Apr 29, 2025

This conditional was added with the popcount heuristic as it would call escape_UTF8_char_basic for all characters in a chunk even if they didn't need to be escaped. Without that this isn't necessary as search_escape_basic* will always return non-zero when search->ptr is pointing to a character that needs to be escaped.

@byroot byroot merged commit 0bfe7cc into ruby:master Apr 29, 2025
34 checks passed
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