RoaringBitmap / RoaringBitmap/roaring
Implement in-place xOrProduceAnd()
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 2.9k
- Forks
- 262
- Avg merge
- 2h 34m
- Merged PRs (30d)
- 8
Description
The pseudocode for addDigit in https://github.com/RoaringBitmap/roaring/issues/260
includes the two lines
carry := roaring.And(bsi.bA[i], bitmap)
bsi.bA[i].Xor(bitmap)
And() and Xor() do basically the same operations. In both they iterate forward through the container keys, comparing them, then making a decision about should happen at each step. This could be optimized by doing both operations in a single pass. I'm not sure the best name for the method, but the signature would look like
func (bitmap *Bitmap) XorWithAndReturned(other *Bitmap) *Bitmap {}
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 with the addDigit pseudocode in issue #260 and compare Bitmap.And with Bitmap.Xor, focusing on their forward container-key iteration. Implement the proposed Bitmap.XorWithAndReturned entry point so it combines both operations in one pass, returns the And result, and preserves the existing Xor behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- data
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100