Skip to content
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

No benefit with new bulk approach for And ? #25

Open
marniks7 opened this issue Apr 25, 2022 · 1 comment
Open

No benefit with new bulk approach for And ? #25

marniks7 opened this issue Apr 25, 2022 · 1 comment

Comments

@marniks7
Copy link
Contributor

marniks7 commented Apr 25, 2022

Hi, based on the release v1.2.0 i have tried to use bulk approach for And operation for 1 + 6 extra bitmaps.
Usage: index.And(bms[0], bms[1:]...)
I do understand that there is 1 + 3 extra handled in bulk, and all next extra are handled one-by-one, but still

Timings for bitmap.And: 5.31s before vs 5.38s after (though this vary). I did few other tests and I don't see benefits.

Another test:

name              old time/op    new time/op    delta
FindPriceV2_Real    10.4µs ± 3%    10.3µs ± 3%     ~     (p=1.000 n=5+5)

name              old alloc/op   new alloc/op   delta
FindPriceV2_Real      361B ± 0%      537B ± 0%  +48.75%  (p=0.008 n=5+5)

name              old allocs/op  new allocs/op  delta
FindPriceV2_Real      8.00 ± 0%      9.00 ± 0%  +12.50%  (p=0.008 n=5+5)

Non-bulk approach:
image

Bulk approach:
image

@kelindar
Copy link
Owner

kelindar commented Jun 4, 2022

How big are your test bitmaps and caches? I assume if your bitmaps are small-medium size or your L1/L2 cache is large enough you won't indeed see much benefit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants