cache: implement binary search for ringBuffer range iterations#20498
cache: implement binary search for ringBuffer range iterations#20498apullo777 wants to merge 1 commit intoetcd-io:mainfrom
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: apullo777 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @apullo777. Thanks for your PR. I'm waiting for a etcd-io member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
| } | ||
|
|
||
| // findFirstGreaterOrEqualIndex returns first index with revision >= targetRev, or -1 if none. | ||
| func (r *ringBuffer[T]) findFirstGreaterOrEqualIndex(targetRev int64) int { |
There was a problem hiding this comment.
Any performance improvement should be verified by accompanied benchmarks.
|
/ok-to-test |
|
Do we have enough unit tests that cover all corner cases to fill safe optimizing here? |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted filessee 21 files with indirect coverage changes @@ Coverage Diff @@
## main #20498 +/- ##
==========================================
+ Coverage 69.21% 69.22% +0.01%
==========================================
Files 419 419
Lines 34745 34745
==========================================
+ Hits 24049 24053 +4
+ Misses 9300 9295 -5
- Partials 1396 1397 +1 Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
|
/retest |
|
Please rebase |
Signed-off-by: Peter Chang <peter.yaochen.chang@gmail.com>
2d70ceb to
9ef7cef
Compare
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed after 21 days if no further activity occurs. Thank you for your contributions. |
Please read https://github.com/etcd-io/etcd/blob/main/CONTRIBUTING.md#contribution-flow.
Open this PR to replace linear scan with binary search in ringBuffer pivot range operations
@serathius @MadhavJivrajani