-
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
faster iandnot between bitmap containers and run containers #418
Conversation
wordRangeStart := rc.iv[0].start / 64 | ||
wordRangeEnd := (rc.iv[len(rc.iv)-1].last()) / 64 // inclusive | ||
|
||
cardinalityChange := popcntSlice(bc.bitmap[wordRangeStart : wordRangeEnd+1]) // before cardinality - after cardinality (for word range) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not understand this part. I don't understand how you can update the cardinality with a single popcntSlice.
I suspect it is not correct... I am troubled by the fact that our test pass... but my suspicions is that the code is not correct. Can you convince me?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh. Wait. I see what you are doing. Ok. It looks good.
This is good and I expect to merge. I will give it some time in case someone wants to review it further. |
@lemire I just copied this change over to a benchmarking tool I have that tests a prod workload that uses this function and it seems to break something -- could you hold on merging until I get to the bottom what's happening? |
draft mode |
1c6a47d
to
ce0ef6c
Compare
all fixed! thanks for your patience |
Merging. |
Rather than converting a run container to a bitmap container and then performing iandnot, call removeRange directly.