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

provisional: heuristic improvement for RotatingBloomFilter #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vadim-ex
Copy link
Contributor

I would expect that (at least for Moz applications) the objects would
tend to cluster. In other words that propability to see old object
is lower than to see the young one. It does not matter for the classic
bloom filter, but the proposed change would improve performance of the
rotating one.

@dlecocq @b4hand @lindseyreno @tammybailey

I would expect that (at least for Moz applications) the objects would
tend to cluster. In other words that propability to see old object
is lower than to see the young one. It does not matter for the classic
bloom filter, but the proposed change would improve performance of the
rotating one.
@@ -146,9 +146,9 @@ cdef class RotatingBloomFilter:
def rotate(self):
'''Add a new bloom filter to our deque and remove any old bloom filters.'''
self.bloom = BloomFilter(self.capacity, self.error_rate)
self.blooms.append(self.bloom)
self.blooms.appendleft(self.bloom)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Considering that blooms is a public property via lines 142-144, this is an interface change. I'd recommend bumping the version number. In fact, the same could be said for #13, so you may want to bump the version twice. It doesn't look like this package is yet published to pypi, and I'm not sure how we're currently pinning versions internally, but that's something that should probably be addressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants