-
Notifications
You must be signed in to change notification settings - Fork 2
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
Bitmap size is limited to 2^32 elements #1
Comments
I'll add 64 bit support soon, but until then it's a good idea to feature this limitation more prominently in the readme. |
Honnestly, everything was working smoothly and I absolutely didn't expect it to be limited to as little as 2^32 so I didn't even thought of reading the code and checking the signature. On one hand it was bad practice on my part, but on the other hand I can't imagine being the only one surprised. In that regard I think mentionning that you're planning to add support for 64 bits in the readme would be great. |
I see. I've added the limitations section to the README, to make 32bits limitation more prominent. If you don't mind me asking, how are you using this library? E.g., do you store IDs in a bitmap? |
I needed to run some statistical cryptographical tests and specifically needed to count uniquely more than 2^32 elements. As no normal array would be practical I tried using phobos' bitarray but hit a codegen bug, and found this library right after. Now, no production relies on this, but I still specifically needed more than 2^32 elements (it's okay now, I worked arround that limitation). |
Thanks. I'll leave this ticket open until we have 64bit bitmaps support for this library. |
Bitmap size is limited to 2^32 elements. Adding more elements will cause integer overflow of the length.
Test (quite long to run):
This is not directly an issue with the D wrapper but with the underlying C library (see RoaringBitmap/CRoaring#1). I choose however to open an issue nonetheless because that overflow happens without any safeguard or warning and isn't documented anywhere.
The text was updated successfully, but these errors were encountered: