feat: implement roaring64_bitmap_overwrite#789
Merged
lemire merged 1 commit intoRoaringBitmap:masterfrom Mar 3, 2026
Merged
Conversation
SLieve
reviewed
Mar 3, 2026
Comment on lines
+58
to
+59
| * It might be preferable and simpler to call roaring64_bitmap_copy except | ||
| * that roaring64_bitmap_overwrite can save on memory allocations. |
Contributor
There was a problem hiding this comment.
Are we actually saving on allocations? It seems like we redo everything.
Member
Author
There was a problem hiding this comment.
Yeah, it's really just the malloc'd roaring64_bitmap_t itself that's being re-used so far.
Contributor
There was a problem hiding this comment.
Not sure if this is needed tbh, I can't think of a scenario where this would matter a lot.
Member
Author
There was a problem hiding this comment.
Just added re-using the memory for the list of containers as well.
I do think it's not very useful, but it'd be nice to have parity with the 32 bit bitmaps. Theoretically, it could be optimized to be smarter in terms of re-using the ART allocations too.
3477202 to
5caf468
Compare
SLieve
approved these changes
Mar 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See #549