Skip to content

Improve the Extend::extend implementation for performances#306

Merged
Kerollmops merged 5 commits intomainfrom
insert-many
Jan 7, 2025
Merged

Improve the Extend::extend implementation for performances#306
Kerollmops merged 5 commits intomainfrom
insert-many

Conversation

@Kerollmops
Copy link
Member

@Kerollmops Kerollmops commented Dec 9, 2024

Fixes #301.

@Kerollmops Kerollmops changed the title Introduce the RoaringBitmap::insert_many method Introduce the RoaringBitmap::insert_many method Dec 9, 2024
@Kerollmops Kerollmops marked this pull request as ready for review January 7, 2025 14:29
Copy link
Contributor

@irevoire irevoire left a comment

Choose a reason for hiding this comment

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

The code seems right to me. It could execute way quickly if the iterator was sorted, but I guess that can wait until we need it 😅

My only concerns is that, from what I understand, this function is exactly matching the API of the Extend trait.
Shouldn't we implement that trait instead of making our own function?

@Kerollmops Kerollmops changed the title Introduce the RoaringBitmap::insert_many method Improve the Extend::extend implementation for performances Jan 7, 2025
@Kerollmops Kerollmops requested a review from irevoire January 7, 2025 14:55
@Kerollmops
Copy link
Member Author

You are absolutely right that the insert_many method should be replaced by the Extend::extend one. I changed the implementation of the extend method to be the same as the insert_many one and removed the latter.

Thank you 🙏

@Kerollmops Kerollmops mentioned this pull request Jan 7, 2025
Copy link
Contributor

@irevoire irevoire left a comment

Choose a reason for hiding this comment

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

One last smol change and we can merge!

Copy link
Contributor

@irevoire irevoire left a comment

Choose a reason for hiding this comment

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

Perfecto 👌

@Kerollmops Kerollmops merged commit 27743fb into main Jan 7, 2025
@Kerollmops Kerollmops deleted the insert-many branch January 7, 2025 16:16
meili-bors bot added a commit to meilisearch/meilisearch that referenced this pull request Jan 13, 2025
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](RoaringBitmap/roaring-rs#306).

Co-authored-by: Clément Renault <clement@meilisearch.com>
meili-bors bot added a commit to meilisearch/meilisearch that referenced this pull request Jan 13, 2025
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](RoaringBitmap/roaring-rs#306).

Co-authored-by: Clément Renault <clement@meilisearch.com>
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.

What's the best way to insert ordered u32s in a RoaringBitmap?

2 participants