Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.

return bit indices set during an add #17

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

Conversation

simon-weber
Copy link

My project involves multiple nodes maintaining and syncing up bloom filters. To do this efficiently, I need to know which indices get set during an add operation. This PR adds a method to do that.

This isn't quite ready to be merged. Here are some questions for you:

  • would it slow things down to consume the hashes iterator before the loop so we can pre-allocate the indices list? I'd like to avoid dynamically expanding the indices list.
  • what do you want the client interface for this to be? My first thought was that add_return_bits is a more general interface and that add should be calling it, but that would introduce a memory/gc perf regression for code not using the bit indices.

@simon-weber
Copy link
Author

Hm, actually, maybe this function should be a generator of bit indices instead. That would let the caller opt-in to the list allocation overhead if they need it.

@jaybaird
Copy link
Owner

jaybaird commented Nov 2, 2014

Hey, let me take a look at this weekend and I’ll get back to you. Thanks!

On Nov 1, 2014, at 9:05 AM, Simon Weber [email protected] wrote:

Hm, actually, maybe this function should be a generator of bit indices instead. That would let the caller opt-in to the list allocation overhead if they need it.


Reply to this email directly or view it on GitHub.

richard-rogers pushed a commit to whylabs/whylogs-bloom that referenced this pull request Nov 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants