-
Notifications
You must be signed in to change notification settings - Fork 163
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
切片实现的支持泛型的小根堆,简单封装了一下internal里面的红黑树 #218
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #218 +/- ##
==========================================
+ Coverage 95.89% 95.93% +0.04%
==========================================
Files 54 56 +2
Lines 3046 3077 +31
==========================================
+ Hits 2921 2952 +31
Misses 96 96
Partials 29 29
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
这里我认为是没有必要提供一个新的 MinHeap 的。在你准备的优先级淘汰缓存里面,应该只是需要一个优先级队列。所以你可以尝试暴露 internal 里面的 PriorityQueue。PriorityQueue 和 MinHeap 的实现基本上是一样的。
我换成优先级队列看看。好像确实差不多,先map映射然后再优先级队列入队,效果和这个小根堆的效果是一样的,也可以满足随机删除缓存时清理优先级数据的需求。不过这玩意也要先从internal里面放出来。 |
大哥!你的 license 和 format go code 都失败了!运行一下 make check |
复制粘贴一下证书。 |
Signed-off-by: Ming Deng <mingflycash@gmail.com>
在 ecache 里面使用 dev 分支,等 ecache 通过考验,我会发布 0.0.9 |
No description provided.