Looks like the last active discussion of Roaring Bitmaps was 6 years ago: https://news.ycombinator.com/item?id=8796997 possibly when it was first introduced. Interesting comments!
> How do these compare space and performance wise with Judy arrays, which are 256-ary trees whose nodes also distinguish between sparse and dense subsets? https://en.wikipedia.org/wiki/Judy_array
Good question, since the patent on them won't expire until Nov 29, 2020.
Judy arrays seem to be much less known. Looks like today will be Datastructure Thursday; lots of neat stuff to dig into.
It doesn't help that the documentation is very weird.
As an example of a headache, one node type in Judy has a count, followed by that many index bytes, followed by the same number of pointers. In Rust, that would naturally be a struct with two variable-sized fields, which isn't possible, so it's done by defining a struct generic over a pair of array types:
https://github.com/adevore/rudy/blob/300f2cc7842f6329a76fff0...
It looks to me like this is only ever instantiated for 2, 7, or 31 elements, whereas i think for original Judy, it can be any size up to 31 elements (maybe?). Handling a genuinely variable length in Rust would be rather gnarly, because there have to be different types for each length.
I always wondered if relatively recent changes in x86 CPU µarchs broke some of the assumptions that made libjudy perform this great even on Pentium-class hardware, and if the de facto only complete implementation (that I happen to be aware of) could be improved as a consequence, if those changes (i.e., hugely increased cache sizes, etc.) were considered.
What about his floating point conversion software that is basically David Gay's?
His software has very few tests (especially for floating point), there's no paper for the method but nevertheless it apparently gets used at Google almost instantly.
So it looks as if there are connections that regular OSS authors don't have.
I let him know about this and he added the last footnote in [1], but no update of his blog or related github page saying "hah, turns out this was a known method at least in IBM'. It left a slight bad impression in my mind.
So, yeah ..
[1]: https://lemire.me/blog/2016/06/27/a-fast-alternative-to-the-...
See "2 Outline of Approach" section, last 2 paragraphs:
[2]: https://dominoweb.draco.res.ibm.com/reports/rc24100.pdf
Yes, it does not claim anywhere it is his invention - it starts the description of the algorithm with "The common solution", but if you read it, it really looks like the development of the technique as a whole is his; at the end one note says: "The technique described in this blog post is in used within Microsoft Arriba."
If no one had pointed out that it is not his, I would have thought that it was his, the blog post title is "A fast alternative to the fast modulo reduction", and not "How X's algorithm for fast modulo reduction works. My implementation".