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

Conversation

@basil-conto
Copy link
Collaborator

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?
Simplify string splitting logic
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 abo-abo closed this in fb09dc3 Feb 12, 2018

@abo-abo

This comment has been minimized.

Copy link
Owner

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 basil-conto:blc/split branch Feb 12, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.