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

Partial sort of fuzzy filtering results #2240

Merged
merged 9 commits into from
Oct 4, 2021
Merged

Partial sort of fuzzy filtering results #2240

merged 9 commits into from
Oct 4, 2021

Conversation

pepeiborra
Copy link
Collaborator

@pepeiborra pepeiborra commented Sep 24, 2021

This improves the performance of completions by around 25% on a large project (>500k identifiers) and also removes the use of unsafe primitives in the previous in-place solution

@jhrcek
Copy link
Collaborator

jhrcek commented Sep 24, 2021

I don't know the sizes these vectors can reach, but if this is such performance critical piece of code,
would it make make sense using Vector slice instead of list comprehensions in the code you wrote previously?

https://github.com/haskell/haskell-language-server/pull/2225/files#diff-2930c3bdb9fee287ddd29a4f2db79ec551b5641b99b5de8e6b2e1ba4faac9779R87-R88

@pepeiborra
Copy link
Collaborator Author

I don't know the sizes these vectors can reach, but if this is such performance critical piece of code,
would it make make sense using Vector slice instead of list comprehensions in the code you wrote previously?

Good point, slice instead of fromListN saves another 2%. Win!

@pepeiborra
Copy link
Collaborator Author

/rerun-workflow Testing

@pepeiborra pepeiborra marked this pull request as ready for review September 25, 2021 08:19
@pepeiborra pepeiborra force-pushed the fuzzy-sort branch 2 times, most recently from 5b02926 to 9d98199 Compare September 26, 2021 15:18
Copy link
Member

@jneira jneira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for your work in improve perf

@pepeiborra pepeiborra added the merge me Label to trigger pull request merge label Oct 4, 2021
@mergify mergify bot merged commit 6ba5eef into master Oct 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge me Label to trigger pull request merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants