mirror of
				https://github.com/meilisearch/meilisearch.git
				synced 2025-10-30 23:46:28 +00:00 
			
		
		
		
	Prefer using extend when merging bitmaps than unions (less allocations)
This commit is contained in:
		| @@ -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); | ||||
|             } | ||||
|         } | ||||
|     } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user