Possible performance issue when performing look-ups for non-existent entries
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 368
- Forks
- 89
- PR merge metrics
- No merged PRs in 30d
Description
In the method 'basic_bloom_filter::lookup' digests are computed first then subsequently quantized and looked up in the filter.
https://github.com/mavam/libbf/blob/master/src/bf/bloom_filter/basic.cc#L60
Implementations typically for efficiency purposes will have the look-up perform a trivial exit on the first digest that encounters a miss - as computing the hash may cost more than the lookup itself.
This will probably only be a problem when there is a larger expectation for queries/look-ups of non-existent entries versus present/existent ones.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/bf/bloom_filter/basic.cc at basic_bloom_filter::lookup, the entry point named in the issue. Trace how digests are computed and checked, then verify the lookup still returns the same result while avoiding unnecessary work after a miss; run the repository's existing tests if available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- performance
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100