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

Improve performance of skipchars for small inputs #21117

Merged

Conversation

fcard
Copy link
Contributor

@fcard fcard commented Mar 20, 2017

This mostly solves the problem, now the function is only significantly (2x) slower when there are no characters to skip, otherwise it's mostly the same for 1 or 2 characters and faster for 3 or more.

Also improves the tests a little.


No longer a large performance regression, only a few inches long.

Hopefully this is a fairly straight forward improvement and will be merged soon. Thank you @nalimilan and @JeffBezanson for pretty much giving me the solution on a plate.

This mostly solves the problem, now the function is only significantly (2x) slower when there are no characters to skip, otherwise it's mostly the same for 1 or 2 characters and faster for 3 or more.

Also improve the tests a little.
@JeffBezanson JeffBezanson merged commit 90cfb82 into JuliaLang:master Mar 21, 2017
@oscardssmith
Copy link
Member

This probably should have a test

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.

3 participants