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

Implements multioperation for the bitmaps and tree maps #223

Merged
merged 38 commits into from
Aug 30, 2022

Conversation

irevoire
Copy link
Contributor

@irevoire irevoire commented Jun 27, 2022

Fixes #57, closes #58, closes #109, closes #139, and closes #219.

There is a lot of performance improvement, but here is a before / after on the operations that were the faster currently (when we can do assign between owned bitmaps).

And

group                                                    after                                  before
-----                                                    -----                                  ------
Successive And/Multi And Owned/census-income             1.00     14.6±0.25µs        ? ?/sec    15.42   224.9±0.76µs        ? ?/sec
Successive And/Multi And Owned/census-income_srt         1.00     14.2±0.25µs        ? ?/sec    3.98     56.4±8.22µs        ? ?/sec
Successive And/Multi And Owned/census1881                1.00     20.7±0.33µs        ? ?/sec    37.18   770.1±1.62µs        ? ?/sec
Successive And/Multi And Owned/census1881_srt            1.00     25.8±1.29µs        ? ?/sec    1.12     28.8±0.09µs        ? ?/sec
Successive And/Multi And Owned/weather_sept_85           1.00     60.7±2.48µs        ? ?/sec    2.15    130.2±2.96µs        ? ?/sec
Successive And/Multi And Owned/weather_sept_85_srt       1.00     48.3±2.21µs        ? ?/sec    2.32    112.2±1.07µs        ? ?/sec
Successive And/Multi And Owned/wikileaks-noquotes        1.00     24.4±0.50µs        ? ?/sec    2.73     66.6±0.27µs        ? ?/sec
Successive And/Multi And Owned/wikileaks-noquotes_srt    1.00     20.3±0.58µs        ? ?/sec    1.09     22.0±0.30µs        ? ?/sec

Or

group                                                    after                                  before
-----                                                    -----                                  ------
Successive Or/Multi Or Owned/census-income               1.00    629.3±4.46µs        ? ?/sec    2.29  1441.4±41.36µs        ? ?/sec
Successive Or/Multi Or Owned/census-income_srt           1.00    582.5±1.81µs        ? ?/sec    1.61    937.8±4.03µs        ? ?/sec
Successive Or/Multi Or Owned/census1881                  1.00   1143.4±4.55µs        ? ?/sec    3.48      4.0±0.07ms        ? ?/sec
Successive Or/Multi Or Owned/census1881_srt              1.00    743.4±4.40µs        ? ?/sec    3.49      2.6±0.02ms        ? ?/sec
Successive Or/Multi Or Owned/weather_sept_85             1.00      2.9±0.02ms        ? ?/sec    1.06      3.1±0.01ms        ? ?/sec
Successive Or/Multi Or Owned/weather_sept_85_srt         1.00   1344.5±7.80µs        ? ?/sec    1.06  1426.5±38.08µs        ? ?/sec
Successive Or/Multi Or Owned/wikileaks-noquotes          1.00    476.3±4.43µs        ? ?/sec    5.27      2.5±0.01ms        ? ?/sec
Successive Or/Multi Or Owned/wikileaks-noquotes_srt      1.00    259.4±3.90µs        ? ?/sec    7.17   1860.0±3.30µs        ? ?/sec

@irevoire irevoire marked this pull request as ready for review July 1, 2022 13:51
@irevoire irevoire changed the title Treemap Implements multioperation for the bitmaps and tree maps Jul 1, 2022
src/lib.rs Outdated Show resolved Hide resolved
src/bitmap/ops.rs Outdated Show resolved Hide resolved
@irevoire irevoire marked this pull request as draft August 18, 2022 15:54
src/bitmap/ops.rs Outdated Show resolved Hide resolved
src/bitmap/ops.rs Outdated Show resolved Hide resolved
@irevoire irevoire marked this pull request as ready for review August 29, 2022 15:17
Copy link
Member

@Kerollmops Kerollmops left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is amazing, I love it ❤️

However, would it be possible to publish some simple benchmarks comparison (using critcmp) with the basic reduce-and-collect operations from the past, please?

src/lib.rs Show resolved Hide resolved
src/treemap/multiops.rs Outdated Show resolved Hide resolved
src/treemap/multiops.rs Outdated Show resolved Hide resolved
src/bitmap/multiops.rs Outdated Show resolved Hide resolved
src/bitmap/multiops.rs Outdated Show resolved Hide resolved
src/bitmap/multiops.rs Outdated Show resolved Hide resolved
src/bitmap/multiops.rs Outdated Show resolved Hide resolved
src/bitmap/multiops.rs Outdated Show resolved Hide resolved
src/bitmap/multiops.rs Outdated Show resolved Hide resolved
Co-authored-by: Clément Renault <renault.cle@gmail.com>
src/bitmap/multiops.rs Outdated Show resolved Hide resolved
src/bitmap/multiops.rs Outdated Show resolved Hide resolved
src/bitmap/multiops.rs Outdated Show resolved Hide resolved
src/bitmap/multiops.rs Outdated Show resolved Hide resolved
src/bitmap/multiops.rs Outdated Show resolved Hide resolved
src/bitmap/multiops.rs Outdated Show resolved Hide resolved
irevoire and others added 3 commits August 30, 2022 12:02
Co-authored-by: Clément Renault <renault.cle@gmail.com>
Co-authored-by: Clément Renault <renault.cle@gmail.com>
src/bitmap/multiops.rs Outdated Show resolved Hide resolved
src/bitmap/multiops.rs Outdated Show resolved Hide resolved
src/bitmap/multiops.rs Outdated Show resolved Hide resolved
src/bitmap/multiops.rs Outdated Show resolved Hide resolved
Copy link
Member

@Kerollmops Kerollmops left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much for the work you've done on this. It is quite impressive 🎉
I'll be able to do a new release after I merge #237 and #236!
bors merge

@bors
Copy link
Contributor

bors bot commented Aug 30, 2022

Build succeeded:

@bors bors bot merged commit 2828be5 into RoaringBitmap:master Aug 30, 2022
not-jan pushed a commit to not-jan/roaring-rs that referenced this pull request Aug 31, 2022
223: Implements multioperation for the bitmaps and tree maps r=Kerollmops a=irevoire

Fixes RoaringBitmap#57, closes RoaringBitmap#58, closes RoaringBitmap#109, closes RoaringBitmap#139, and closes RoaringBitmap#219.

There is a lot of performance improvement, but here is a before / after on the operations that were the faster currently (when we can do assign between owned bitmaps).

## And
```
group                                                    after                                  before
-----                                                    -----                                  ------
Successive And/Multi And Owned/census-income             1.00     14.6±0.25µs        ? ?/sec    15.42   224.9±0.76µs        ? ?/sec
Successive And/Multi And Owned/census-income_srt         1.00     14.2±0.25µs        ? ?/sec    3.98     56.4±8.22µs        ? ?/sec
Successive And/Multi And Owned/census1881                1.00     20.7±0.33µs        ? ?/sec    37.18   770.1±1.62µs        ? ?/sec
Successive And/Multi And Owned/census1881_srt            1.00     25.8±1.29µs        ? ?/sec    1.12     28.8±0.09µs        ? ?/sec
Successive And/Multi And Owned/weather_sept_85           1.00     60.7±2.48µs        ? ?/sec    2.15    130.2±2.96µs        ? ?/sec
Successive And/Multi And Owned/weather_sept_85_srt       1.00     48.3±2.21µs        ? ?/sec    2.32    112.2±1.07µs        ? ?/sec
Successive And/Multi And Owned/wikileaks-noquotes        1.00     24.4±0.50µs        ? ?/sec    2.73     66.6±0.27µs        ? ?/sec
Successive And/Multi And Owned/wikileaks-noquotes_srt    1.00     20.3±0.58µs        ? ?/sec    1.09     22.0±0.30µs        ? ?/sec
```

## Or
```
group                                                    after                                  before
-----                                                    -----                                  ------
Successive Or/Multi Or Owned/census-income               1.00    629.3±4.46µs        ? ?/sec    2.29  1441.4±41.36µs        ? ?/sec
Successive Or/Multi Or Owned/census-income_srt           1.00    582.5±1.81µs        ? ?/sec    1.61    937.8±4.03µs        ? ?/sec
Successive Or/Multi Or Owned/census1881                  1.00   1143.4±4.55µs        ? ?/sec    3.48      4.0±0.07ms        ? ?/sec
Successive Or/Multi Or Owned/census1881_srt              1.00    743.4±4.40µs        ? ?/sec    3.49      2.6±0.02ms        ? ?/sec
Successive Or/Multi Or Owned/weather_sept_85             1.00      2.9±0.02ms        ? ?/sec    1.06      3.1±0.01ms        ? ?/sec
Successive Or/Multi Or Owned/weather_sept_85_srt         1.00   1344.5±7.80µs        ? ?/sec    1.06  1426.5±38.08µs        ? ?/sec
Successive Or/Multi Or Owned/wikileaks-noquotes          1.00    476.3±4.43µs        ? ?/sec    5.27      2.5±0.01ms        ? ?/sec
Successive Or/Multi Or Owned/wikileaks-noquotes_srt      1.00    259.4±3.90µs        ? ?/sec    7.17   1860.0±3.30µs        ? ?/sec
```

Co-authored-by: saik0 <github@saik0.net>
Co-authored-by: Kerollmops <clement@meilisearch.com>
Co-authored-by: Tamo <tamo@meilisearch.com>
Co-authored-by: Irevoire <tamo@meilisearch.com>
Co-authored-by: Tamo <irevoire@protonmail.ch>
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

Successfully merging this pull request may close these issues.

Set operations for multiple sets at a time
3 participants