✨ Simplify and speedup priority queue#3471
✨ Simplify and speedup priority queue#3471inteon wants to merge 1 commit intokubernetes-sigs:mainfrom
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: inteon 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 |
c2a810e to
1c8ad6a
Compare
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
alvaroaleman
left a comment
There was a problem hiding this comment.
This change is doing way too many many things at once without explanation other than a benchmark result in the cover letter. If you want a chance at getting something merged, please do small and targeted changes with a description and demonstration of their impact
| addBuffer: make(map[T]*item[T]), | ||
| addBufferOld: make(map[T]*item[T]), | ||
| items: map[T]trackingItem[T]{}, | ||
| ready: btree.NewWithFreeList(32, lessReady[T], freeList), |
There was a problem hiding this comment.
This aproach actually results in a smaller freelist, since btree.New is just NewWithFreeList(degree, less, NewFreeList[T](DefaultFreeListSize)) under the hood
I reviewed the priority queue source code, simplified it and tried to improve the benchmarks.