3 ms·
As an aside if you find yourself having to compute them on the fly, know that the Roaring Bitmaps libraries is the way to go [1]. The bitmaps are compressed, an
by BenoitP 4y ago
As an aside if you find yourself having to compute them on the fly, know that the Roaring Bitmaps libraries is the way to go [1]. The bitmaps are compressed, and can be streamed directly into SIMD computations (batching boolean transformations and popcnts 256 bits wide!). The Jaccard index is just intersection_len / union_len [2] away
Of note: the author of that library is none other than Daniel Lemire [3], whose articles pop up quite often on HN
[1] https://roaringbitmap.org/ https://roaringbitmap.org/
[2] https://roaringbitmap.readthedocs.io/en/latest/#roaringbitmap.RoaringBitmap.intersection_len https://roaringbitmap.readthedocs.io/en/latest/#roaringbitma...
[3] https://lemire.me/blog/ https://lemire.me/blog/