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

Collect NIL nodes on binheap down percolation #125

Open
1 task
Ianleeclark opened this issue Aug 19, 2016 · 0 comments
Open
1 task

Collect NIL nodes on binheap down percolation #125

Ianleeclark opened this issue Aug 19, 2016 · 0 comments

Comments

@Ianleeclark
Copy link
Owner

This is essentially an optimization for the key expiration, as if we expire > 1 key at a time, we'll be left with > 1 nil block at a time. What I want to do is to treat a block of nil nodes as a single node and percolate the block down normally. I think this will reduce total time complexity from O(MlogN) to O(logN) where N is the number of total nodes in the binary heap and M is the number of nil nodes at the head of the list.

  • Percolate chunks of nil nodes down as if they're a single node
@Ianleeclark Ianleeclark changed the title Aggregate nil blocks on binheap down percolation Collect NIL nodes on binheap down percolation Aug 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant