-
Notifications
You must be signed in to change notification settings - Fork 223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimize the implementation of OrCardinality #40
Comments
@lemire I started taking a look at this and got a little confused. I'll list out what I found, and just say there is a good chance I'm missing something and would greatly appreciate any pointers on what operations are still missing here. https://github.com/RoaringBitmap/roaring/blob/master/setutil.go#L211 has
Line 647 in b747b1b
I also see OrCardinality, AndCardinality, and Intersects implemented herev in the public API: Line 387 in db18267
Line 441 in db18267
Line 488 in db18267
|
@statik I'll get back to you. |
It means that we take the intersection of two sets... as opposed to intersecting 3 sets, and so forth. Arguably, the 2by2 suffix is unnecessary but that's a private function. |
Ok. So the current status of this issue is that it is all implemented except that the Line 416 in db18267
I'll update the issue description to avoid confusion. |
Done. Let us hope that things are clearer now. Thanks for the feedback. |
@lemire thanks! this makes sense. I hope to find some time to work on this. |
@statik Please do. And, also, if you do, don't forget to throw in extra tests for good measure! |
Resolved as of this commit 8a91ca4 |
Currently, the OrCardinality function materializes temporary containers that are immediately (?) garbage collected. This is wasteful. Instead, we should have fast container-to-container union functions that just return the cardinality without doing memory allocation, as is the case with the intersections.
roaring/roaring.go
Line 416 in db18267
c.c. @tgruben @statik @bpot @tvmaly
The text was updated successfully, but these errors were encountered: