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

strings: fix performance of nextind #51671

Merged
merged 1 commit into from
Oct 27, 2023
Merged

strings: fix performance of nextind #51671

merged 1 commit into from
Oct 27, 2023

Conversation

vtjnash
Copy link
Member

@vtjnash vtjnash commented Oct 11, 2023

The recursion (for invalid bytes) was preventing inlining, as was the length of the function. For ASCII data, the cost of the call far exceeds the cost of decoding the data.

This was harmed by Keno's PR #50805, since we now miscompute the inlining cost of the error branch, though I don't think it worked before either as we still mis-estimated the cost of jl_string_ptr as 20 instead of 1.

Closes #51624

@nanosoldier runbenchmarks("string" || "strings" || "io", vs=":master")

The recursion (for invalid bytes) was preventing inlining, as was the
length of the function. For ASCII data, the cost of the call far exceeds
the cost of decoding the data.

Closes #51624
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.

lstrip could be more efficient: enumerate vs pairs
4 participants