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

len is slow #710

Closed
casey opened this issue Oct 31, 2023 · 2 comments
Closed

len is slow #710

casey opened this issue Oct 31, 2023 · 2 comments

Comments

@casey
Copy link
Contributor

casey commented Oct 31, 2023

Ord got really slow recently, and it turned out to be due to adding a call to GIGANTIC_TABLE.len(), which looks innocent, but actually iterates over the entire table. If it isn't too hard, it might be a good idea to cache the length so it can be a constant-time operation.

@cberner
Copy link
Owner

cberner commented Nov 2, 2023

Ya, that seems like a good optimization to have. Unfortunately it will require a file format change. I'll add it to my list of things to look into for 2.0

@cberner
Copy link
Owner

cberner commented Nov 5, 2023

Merged into #677

@cberner cberner closed this as completed Nov 5, 2023
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

2 participants