Skip to content

Use optimised string search methods for substrings, too#52424

Merged
oscardssmith merged 1 commit into
JuliaLang:masterfrom
jakobnissen:optim
Dec 11, 2023
Merged

Use optimised string search methods for substrings, too#52424
oscardssmith merged 1 commit into
JuliaLang:masterfrom
jakobnissen:optim

Conversation

@jakobnissen
Copy link
Copy Markdown
Member

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 strings "Strings!" labels Dec 7, 2023
Copy link
Copy Markdown
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

@oscardssmith oscardssmith merged commit 5e9cd58 into JuliaLang:master Dec 11, 2023
@jakobnissen jakobnissen deleted the optim branch January 9, 2024 08:09
@nickrobinson251
Copy link
Copy Markdown
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

performance Must go faster strings "Strings!"

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants