3 ms·
There is a better way to do this by using bitmaps (especially bitmaps in Redis). I recommend looking at https://github.com/Doist/bitmapist https://github.com/Do
by amix 12y ago
There is a better way to do this by using bitmaps (especially bitmaps in Redis). I recommend looking at https://github.com/Doist/bitmapist https://github.com/Doist/bitmapist
- kiran_kulkarni 12y agoTechnically HyperLogLog works on bitmaps, this library leverages this fact and uses Redis bitmaps instead of an in-memory implementation. Although we are fans of Redis, if you implement it natively you can avoid network latency. Implementing it natively is not a problem because of the commutative nature of HyperLogLog Further, If one is planning to use Redis it will be better to use built-in HyperLogLog datastructure provided by Redis 2.8.9 as documented here http://antirez.com/news/75 http://antirez.com/news/75