hyperloglog

HyperLogLog with lots of sugar (Sparse, LogLog-Beta bias correction and TailCut space reduction)

Github星跟踪图

Hyperloglog Logo


GoDoc Go Report Card CircleCI

An improved version of HyperLogLog for the count-distinct problem, approximating the number of distinct elements in a multiset using 33-50% less space than other usual HyperLogLog implementations.

This work is based on "Better with fewer bits: Improving the performance of cardinality estimation of large data streams - Qingjun Xiao, You Zhou, Shigang Chen".

Implementation

The core differences between this and other implementations are:

  • use metro hash instead of xxhash
  • sparse representation for lower cardinalities (like HyperLogLog++)
  • loglog-beta for dynamic bias correction medium and high cardinalities.
  • 4-bit register instead of 5 (HLL) and 6 (HLL++), but most implementations use 1-byte registers out of convenience

In general it borrows a lot from InfluxData's fork of Clark Duvall's HyperLogLog++ implementation, but uses 50% less space.

Results

A direct comparison with the HyperLogLog++ implementation used by InfluxDB yielded the following results:, Exact, Axiom (8.2 KB), Influx (16.39 KB), ---, ---, ---, 10, 10 (0.0% off), 10 (0.0% off), 50, 50 (0.0% off), 50 (0.0% off), 250, 250 (0.0% off), 250 (0.0% off), 1250, 1249 (0.08% off), 1249 (0.08% off), 6250, 6250 (0.0% off), 6250 (0.0% off), 31250, 31008 (0.7744% off), 31565 (1.0080% off), 156250, 156013 (0.1517% off), 156652 (0.2573% off), 781250, 782364 (0.1426% off), 775988 (0.6735% off), 3906250, 3869332 (0.9451% off), 3889909 (0.4183% off), 10000000, 9952682 (0.4732% off), 9889556 (1.1044% off), ## Note
A big thank you to Prof. Shigang Chen and his team at the University of Florida who are actively conducting research around "Big Network Data".


An Axiom production.

Do you enjoy solving problems like these? If so, get in touch with us at careers@axiom.co!

主要指标

概览
名称与所有者axiomhq/hyperloglog
主编程语言Go
编程语言Go (语言数: 1)
平台
许可证MIT License
所有者活动
创建于2017-06-18 11:18:12
推送于2025-05-19 08:59:48
最后一次提交
发布数7
最新版本名称v0.2.5 (发布于 )
第一版名称v0.1.0 (发布于 2024-08-18 14:36:36)
用户参与
星数1k
关注者数21
派生数74
提交数138
已启用问题?
问题数15
打开的问题数4
拉请求数32
打开的拉请求数1
关闭的拉请求数6
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?