-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Improving performance of done(s::AbstractString, i)
#18081
Comments
Maybe cache it in the iterator state? |
Why does |
Re-opening as the change was reverted in 6d179b3 |
I tried to fix this in an alternative way by just using a new iterator but a lot of methods rely on |
I think you're right that people shouldn't rely on this. |
I've noticed that you can improve string iteration performance by avoiding using
done
as the condition in a loop. Takelstrip
as an example:Current implementation:
Revised version:
The results:
Maybe it would be worthwhile caching the
endof
result in theString
object?The text was updated successfully, but these errors were encountered: