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

RangeMap should use bisect #9

Open
jaraco opened this issue Oct 29, 2022 · 0 comments
Open

RangeMap should use bisect #9

jaraco opened this issue Oct 29, 2022 · 0 comments

Comments

@jaraco
Copy link
Owner

jaraco commented Oct 29, 2022

The current implementation of RangeMap does a linear search of keys in the space. Instead, there are opportunities for optimization:

  • Rely on dict for exact key matches.
  • Use 'bisect.bisect' to search the key space.
  • Sort the space in advance to avoid sort on every lookup.
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

No branches or pull requests

1 participant