-
Notifications
You must be signed in to change notification settings - Fork 84
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
What's the best way to insert ordered u32
s in a RoaringBitmap
?
#301
Comments
The implementation of The solution for this might be calling |
Hey @lemolatoon 👋
Thank you very much for your PR again. I'll also ask the help of Daniel Lemire on that just to see what he thinks is the best solution for that before diving into the code. I am still wondering if it doesn't cost too much to convert integers to bitmaps to a union just after. Isn't there a more direct way? Have a nice day 🦃 |
Hey @lemire 👋 I'm curious if you can assist me with this topic. I came across the Implementing a lazy batch system to insert these ordered u32 blocks into a single roaring bitmap would be beneficial. Do you have insights on the optimal approach for creating bitmaps from sorted u32s? Have a nice day 🌮 |
As what is best, it is not possible to answer this question in the abstract. If you have a specific workload, you can tell what works best, but if you just tell me that you have a sorted array of integers... it is not possible to know very much. |
Thank you very much @lemire. I'll take a look at these functions and will probably take inspiration from that to implement the same in this library. About the workload. In the new Meilisearch indexer we decided to compress integers with bit packing (with the bit packing library, inspired by your work) to reduce the memory usage of the engine when indexing and sequentially, in parallel, union multiple bit packed (using Bbbul) ordered sets of integers into roaring bitmaps (original issue comment) to finally serialize them to disk. |
That's interesting. (Update: I knew about it at some point in the past.) |
This is an open question about this library.
We are extensively using
RoaringBitmap
s at Meilisearch, and we have very special usage of bitmaps mixed with bit-packing. Bitpacking is primarily used to compress ordered lists ofu32
s and consume less memory. But when merging multiple bit-packed lists, we retrieve a bunch of ordered (and unique)u32
s that we want to insert in roaring bitmaps efficiently.The following lines show the way we union the ordered
u32
s into an existing bitmap:What could be the best and most efficient way to insert a bunch of ordered
u32
s into an existing bitmap?I wonder if #288 is related to this and if we should just convert this
u32
s list into a bitmap.The text was updated successfully, but these errors were encountered: