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

We have no rules for takeWhile and dropWhile, unlike the ones for span and break. #176

Closed
ekmett opened this issue Jun 10, 2019 · 0 comments · Fixed by #275
Closed

We have no rules for takeWhile and dropWhile, unlike the ones for span and break. #176

ekmett opened this issue Jun 10, 2019 · 0 comments · Fixed by #275
Milestone

Comments

@ekmett
Copy link
Member

ekmett commented Jun 10, 2019

break and span have specialized RULES in terms of breakByte and spanByte that enable them to lean on the power of elemIndex (and hence transitively on the power memchr).

However, there are no equivalent rules in place for takeWhile (x ==), takeWhile (== x), dropWhile (x ==), dropWhile (==x), takeWhile (x /=), takeWhile (/= x), dropWhile (x/=) and dropWhile (/= x), which are in turn implemented on top of findIndexOrEnd, and hence follow a slower path, despite returning less stuff.

@hvr hvr added the blocked: patch-needed somebody needs to write a patch or contribute code label Dec 19, 2019
@Bodigrim Bodigrim removed the blocked: patch-needed somebody needs to write a patch or contribute code label Aug 28, 2020
@Bodigrim Bodigrim added this to the 0.11.0.0 milestone Sep 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants