Lune

KDD2022Top-tier venue

HyperLogLogLog: Cardinality Estimation With One Log More

Matti Karppa, Rasmus Pagh

Abstract

We present HyperLogLogLog, a practical compression of the Hy-perLogLog sketch that compresses the sketch from 𝑂 (𝑚 log log 𝑛) bits down to 𝑚 log 2 log 2 log 2 𝑚 + 𝑂 (𝑚 + log log 𝑛) bits for estimating the number of distinct elements 𝑛 using 𝑚 registers. The algorithm works as a drop-in replacement that preserves all estimation properties of the HyperLogLog sketch, it is possible to convert back and forth between the compressed and uncompressed representations, and the compressed sketch maintains mergeability in the compressed domain. The compressed sketch can be updated in amortized constant time, assuming 𝑛 is sufficiently larger than 𝑚. We provide a C++ implementation of the sketch, and show by experimental evaluation against well-known implementations by Google and Apache that our implementation provides small sketches while maintaining competitive update and merge times. Concretely, we observed approximately a 40% reduction in the sketch size. Furthermore, we obtain as a corollary a theoretical algorithm that compresses the sketch down to 𝑚 log 2 log 2 log 2 log 2 𝑚 + 𝑂 (𝑚 log log log 𝑚/log log 𝑚 + log log 𝑛) bits.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

4 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Sublime: Sublinear Error & Space for Unbounded Skewed Streams cites UltraLogLog: A Practical and More Space-Efficient Alternative to HyperLogLog for Approximate Distinct Counting
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers4

  1. UltraLogLog: A Practical and More Space-Efficient Alternative to HyperLogLog for Approximate Distinct CountingOtmar ErtlVLDB 2024 · 12 citations
  2. QSketch: An Efficient Sketch for Weighted Cardinality Estimation in StreamsYiyan Qi, Rundong Li, Pinghui Wang, Yufang Sun et al.KDD 2024 · 3 citations
  3. Efficient and Accurate Differentially Private Cardinality Continual ReleasesDongdong Xie, Pinghui Wang, Quanqing Xu, Chuanhui Yang et al.SIGMOD 2025 · 1 citation
  4. Sublime: Sublinear Error & Space for Unbounded Skewed StreamsNavid Eslami, Ioana O. Bercea, Rasmus Pagh, Niv DayanSIGMOD 2026

Related papers

  1. A Better Cardinality Estimator with Fewer Bits, Constant Update Time, and MergeabilityYang Du, He Huang, Yu-e Sun, Kejian Li et al.INFOCOM 2023 · 6 citations
  2. Unmasking Vulnerabilities: Cardinality Sketches under Adaptive InputsSara Ahmadian, Edith CohenICML 2024 · 7 citations
  3. SetSketch: Filling the Gap between MinHash and HyperLogLogOtmar ErtlVLDB 2021 · 17 citations
  4. Sketch-Flip-Merge: Mergeable Sketches for Private Distinct CountingJonathan Hehir, Daniel Ting, Graham CormodeICML 2023 · 12 citations
  5. Information theoretic limits of cardinality estimation: Fisher meets ShannonSeth Pettie, Dingyu WangSTOC 2021 · 12 citations
Dusk over the sea between two cliffs drawn in fine vertical lines