-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Chunk iterator performance improvement #1203
Conversation
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Why did you close that one ? It was looking good. |
Updated the benchmarks to be more comprehensive:
@cyriltovena I just should have waited til Monday. I was unsure of the validity of the benchmarks and wanted to feel more comfortable before someone merged. |
Signed-off-by: Joe Elliott <number101010@gmail.com>
Unsure regarding panic vs returning the zero-value struct, but I believe your approach is good. I know that in cortex, for instance, we assume that entries will not be checked when :lgtm: |
Signed-off-by: Joe Elliott <number101010@gmail.com>
@owen-d |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
What this PR does / why we need it:
Improves the headblock iterator performance by storing an index instead of a current item.
Before:
After
Special notes for your reviewer:
Please review and discuss the guard code at the top of
Entry()
would we prefer a panic to returning dummy data here?Checklist