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

Moved ranking to list comprehensions and using heapq #8

Merged
merged 3 commits into from
Sep 19, 2014
Merged

Moved ranking to list comprehensions and using heapq #8

merged 3 commits into from
Sep 19, 2014

Conversation

jdowner
Copy link
Contributor

@jdowner jdowner commented Aug 29, 2014

There are two main changes in this PR. The first is to move the loops into list comprehensions through the use of two new functions: filename_score and path_score (a minor change to make that a little tidier was that line that do not match the pattern are given a score of zero). The second major change is to use the heapq library to find the best scores so that less sorting needs to be performed.

FelikZ added a commit that referenced this pull request Sep 19, 2014
Moved ranking to list comprehensions and using heapq
@FelikZ FelikZ merged commit c6f5d5a into FelikZ:master Sep 19, 2014
FelikZ added a commit that referenced this pull request Sep 19, 2014
Added:
 - support for <c-d> and <c-f> modes
 - Added python3 compatibility

Improved:
 - matching algorithm for all modes
 - better memory usage via #8 ( use heapq to find n best results )
@jdowner jdowner deleted the staging branch September 19, 2014 21:12
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.

2 participants