Maciej Biłas

Results 27 comments of Maciej Biłas

Look good. @prateek are you planning to submit a PR with this change?

No, `ParOr` (soon to be `ParHeapOr`) and `ParAnd` needlessly allocate container slices. A slice is nothing more than a struct of pointer to array, length and capacity, no more than...

@AshKash what would be the serialisation format? Would the bitmap be serialised to a JSON Array of numbers?

I agree. If that's what users would expect – I'm in favour.

@abusizhishen you can use any of the existing serialisation: the default binary format (with https://godoc.org/github.com/RoaringBitmap/roaring#Bitmap.ToBytes) or base64 (https://godoc.org/github.com/RoaringBitmap/roaring#Bitmap.ToBase64). Redis accepts binary data.

That's correct. There are adversarial inputs that will be accepted by either `ReadFrom` or `FromBuffer` without warning and however will result in errors / panics when operating on them. However...

@azurenake there is no open pull request for that feature. Feel free to submit one.

@richardstartin very good point! Thank you!

@anacrolix you're aiming at cutting the allocations from 2 to 1, that's correct?

OK, from what I understand you're storing the struct by value as opposed to by reference in the parent structure. I don't see a reason why you couldn't do it...