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

Simplify string splitting logic #1453

Closed
wants to merge 1 commit into from
Closed

Conversation

basil-conto
Copy link
Collaborator

@basil-conto basil-conto commented Feb 12, 2018

Changelog

ivy.el (ivy--split-negation, ivy--split-spaces): Simplify and optimize logic.
ivy-test.el (ivy--split-negation, ivy--split-spaces): Add tests.
(ivy--split): Fix spelling.

Discussion

  • On my machine the regexp approach is 2-4x as fast.
  • I find the regexp logic simpler, but that's probably because I got close to it.
  • Are the variable names acceptable?

ivy.el (ivy--split-negation, ivy--split-spaces):
Simplify and optimize logic.
ivy-test.el (ivy--split-negation, ivy--split-spaces): Add tests.
(ivy--split): Fix spelling.
@abo-abo
Copy link
Owner

@abo-abo abo-abo commented Feb 12, 2018

Looks good, thanks.

On my machine the regexp approach is 2-4x as fast.

Less Elisp code in the loop body, makes sense.

I find the regexp logic simpler, but that's probably because I got close to it.

Looks simpler to me as well.

Are the variable names acceptable?

Yes, looks OK.

@basil-conto basil-conto deleted the blc/split branch Feb 12, 2018
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.

None yet

2 participants