Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use optimised string search methods for substrings, too #52424

Merged
merged 1 commit into from
Dec 11, 2023

Conversation

jakobnissen
Copy link
Contributor

Allow searching for ASCII chars in substrings to use memchr, and other similar optimisations. Previously, only String was special cased.

Allow searching for ASCII chars in substrings to use memchr, and other similar
optimisations. Previously, only String was special cased.
@brenhinkeller brenhinkeller added performance Must go faster domain:strings "Strings!" labels Dec 7, 2023
Copy link
Sponsor Contributor

@brenhinkeller brenhinkeller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks very reasonable

@jakobnissen jakobnissen added the status:awaiting review PR is complete and seems ready to merge. Has tests and news/compat if needed. CI failures unrelated. label Dec 8, 2023
@oscardssmith oscardssmith removed the status:awaiting review PR is complete and seems ready to merge. Has tests and news/compat if needed. CI failures unrelated. label Dec 11, 2023
@oscardssmith oscardssmith merged commit 5e9cd58 into JuliaLang:master Dec 11, 2023
11 checks passed
@jakobnissen jakobnissen deleted the optim branch January 9, 2024 08:09
@nickrobinson251
Copy link
Contributor

Thanks, @jakobnissen! i was about to make the same change after a colleague reported allocations in findfirst(str1, @view str2[4:10]), and was happy to see it already fixed on master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:strings "Strings!" performance Must go faster
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants