RoaringBitmap / RoaringBitmap/roaring
Optimize the cost of allocating empty bitmaps
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 2.9k
- Forks
- 262
- Avg merge
- 2h 34m
- Merged PRs (30d)
- 8
Description
New{,Bitmap} makes 2 heap allocations that become very costly when dealing with a lot of Bitmap allocations, these allocations occur even for empty Bitmaps. I have a wrapper that avoids these allocations where possible, by providing a lazy initialized Bitmap that works as expected with the zero value. It would be great to see this supported in this repo instead.
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 by locating New and NewBitmap and measure allocations for empty Bitmaps. Compare the linked missinggo bitmap wrapper and the usage in torrent.go, then define tests covering empty and zero-value Bitmap behavior and allocation counts. Done means empty Bitmap creation avoids unnecessary heap allocations without changing expected behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- performance
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100