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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
2702150
add iter ops
saik0 Jan 12, 2022
4cac952
Use the RetainMut fully qualified syntax
Kerollmops Mar 9, 2022
9645524
Implement the first Roaring Treemap multi op
Kerollmops Mar 9, 2022
d2a55ae
add tests to the new bitmap operations
irevoire Jun 22, 2022
b0aef39
add tests
irevoire Jun 23, 2022
ebeaf3a
fix the arbitrary impl
irevoire Jun 23, 2022
b6d543e
implements a first version with a lot of copy pasting
irevoire Jun 23, 2022
b164cce
improve the tests slightly
irevoire Jun 23, 2022
31d8d58
Reduce the amount of code related to treemaps multiops
irevoire Jun 29, 2022
9b8e9d3
improve the tests
irevoire Jun 29, 2022
570fc74
Fix the multiop
irevoire Jun 30, 2022
6b5d9fb
remove the contsraint on the implementation of the IterExt trait
irevoire Jul 1, 2022
529297a
fix and add some benchmarks
irevoire Jul 1, 2022
9c68ae3
make clippy happy
irevoire Jul 4, 2022
73925bb
implement the IterExt trait on results
irevoire Aug 18, 2022
95ba91b
rename `Bitmap` to `Output`
irevoire Aug 18, 2022
ea2ba1e
shortcut the sub and and
irevoire Aug 19, 2022
ea3ae5d
move the multiop to a different module
irevoire Aug 19, 2022
6ed6add
make a specific implementation for the and
irevoire Aug 22, 2022
03d1df8
rename the simple_multi_op to sub
irevoire Aug 22, 2022
aea31a8
specific impl for the xor owned
irevoire Aug 22, 2022
8f31ef8
specialize or and xor
irevoire Aug 22, 2022
69d0ae7
improve the AND performances
irevoire Aug 24, 2022
d6cdac9
slightly improve the or
irevoire Aug 24, 2022
f0d6414
add a few comments
irevoire Aug 24, 2022
6f086ea
rename the trait and add a little bit of documentation
irevoire Aug 29, 2022
5af1213
rename all the ops
irevoire Aug 29, 2022
00484b7
Apply suggestions from code review
irevoire Aug 30, 2022
8ffbe73
change an if to a match stmt
irevoire Aug 30, 2022
d6192a3
rename the internal ops in the treemap
irevoire Aug 30, 2022
b7153e0
fix the benchmarks
irevoire Aug 30, 2022
4a2bf6b
pre-allocate the vec storing the starting elements
irevoire Aug 30, 2022
a2b783b
Update src/bitmap/multiops.rs
irevoire Aug 30, 2022
a10a5be
merge the loops together
irevoire Aug 30, 2022
86ff10b
Typo
irevoire Aug 30, 2022
bb4885a
get rids of arbitrary
irevoire Aug 30, 2022
9bc19c5
apply review comment
irevoire Aug 30, 2022
b083931
makes clippy happy
irevoire Aug 30, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 26 additions & 2 deletions benchmarks/benches/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use criterion::{
Throughput,
};

use roaring::RoaringBitmap;
use roaring::{MultiOps, RoaringBitmap};

use crate::datasets::Datasets;

Expand Down Expand Up @@ -470,6 +470,18 @@ fn successive_and(c: &mut Criterion) {
BatchSize::LargeInput,
);
});

group.bench_function(BenchmarkId::new("Multi And Ref", &dataset.name), |b| {
b.iter(|| black_box(dataset.bitmaps.iter().intersection()));
});

group.bench_function(BenchmarkId::new("Multi And Owned", &dataset.name), |b| {
b.iter_batched(
|| dataset.bitmaps.clone(),
|bitmaps: Vec<RoaringBitmap>| black_box(bitmaps.intersection()),
BatchSize::LargeInput,
);
});
}

group.finish();
Expand Down Expand Up @@ -509,6 +521,18 @@ fn successive_or(c: &mut Criterion) {
}
});
});

group.bench_function(BenchmarkId::new("Multi Or Ref", &dataset.name), |b| {
b.iter(|| black_box(dataset.bitmaps.iter().union()));
});

group.bench_function(BenchmarkId::new("Multi Or Owned", &dataset.name), |b| {
b.iter_batched(
|| dataset.bitmaps.clone(),
|bitmaps: Vec<RoaringBitmap>| black_box(bitmaps.union()),
BatchSize::LargeInput,
);
});
}

group.finish();
Expand Down Expand Up @@ -672,6 +696,6 @@ criterion_group!(
serialization,
deserialization,
successive_and,
successive_or,
successive_or
);
criterion_main!(benches);
1 change: 1 addition & 0 deletions src/bitmap/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
mod arbitrary;
mod container;
mod fmt;
mod multiops;
mod proptests;
mod store;
mod util;
Expand Down
Loading