mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 11:57:07 +02:00
Merge #5221
5221: Merge bitmaps by using `Extend::extend` r=Kerollmops a=Kerollmops This PR tries to speed up the merging of bitmaps by using [the new `Extend::extend` implementation](https://github.com/RoaringBitmap/roaring-rs/pull/306). Co-authored-by: Clément Renault <clement@meilisearch.com>
This commit is contained in:
commit
247eaed872
1 changed files with 2 additions and 6 deletions
|
@ -679,9 +679,7 @@ impl DelAddRoaringBitmap {
|
|||
let del = self.del.get_or_insert_with(RoaringBitmap::new);
|
||||
let mut iter = bbbul.iter_and_clear();
|
||||
while let Some(block) = iter.next_block() {
|
||||
let iter = block.iter().copied();
|
||||
let block = RoaringBitmap::from_sorted_iter(iter).unwrap();
|
||||
*del |= block;
|
||||
del.extend(block);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -689,9 +687,7 @@ impl DelAddRoaringBitmap {
|
|||
let add = self.add.get_or_insert_with(RoaringBitmap::new);
|
||||
let mut iter = bbbul.iter_and_clear();
|
||||
while let Some(block) = iter.next_block() {
|
||||
let iter = block.iter().copied();
|
||||
let block = RoaringBitmap::from_sorted_iter(iter).unwrap();
|
||||
*add |= block;
|
||||
add.extend(block);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue