Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/axiomhq/hyperloglog
HyperLogLog with lots of sugar (Sparse, LogLog-Beta bias correction and TailCut space reduction) brought to you by Axiom
https://github.com/axiomhq/hyperloglog
axiom data-structures go golang hyperloglog
Last synced: 24 days ago
JSON representation
HyperLogLog with lots of sugar (Sparse, LogLog-Beta bias correction and TailCut space reduction) brought to you by Axiom
- Host: GitHub
- URL: https://github.com/axiomhq/hyperloglog
- Owner: axiomhq
- License: mit
- Created: 2017-06-18T11:18:12.000Z (almost 7 years ago)
- Default Branch: main
- Last Pushed: 2024-03-19T10:03:29.000Z (2 months ago)
- Last Synced: 2024-03-19T11:28:15.289Z (2 months ago)
- Topics: axiom, data-structures, go, golang, hyperloglog
- Language: Go
- Homepage: https://axiom.co
- Size: 134 KB
- Stars: 904
- Watchers: 21
- Forks: 70
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Contributing: Contributing.md
- License: LICENSE
Lists
- awesome-go - hyperloglog - HyperLogLog implementation with Sparse, LogLog-Beta bias correction and TailCut space reduction. (Data Structures and Algorithms / Miscellaneous Data Structures and Algorithms)
- awesome-stars - axiomhq/hyperloglog - Beta bias correction and TailCut space reduction) brought to you by Axiom (Go)
- awesome-go - hyperloglog - HyperLogLog implementation with Sparse, LogLog-Beta bias correction and TailCut space reduction. (Data Structures and Algorithms / Miscellaneous Data Structures and Algorithms)
- awesome-go-cn - hyperloglog
- awesome-go-extra - hyperloglog - Beta bias correction and TailCut space reduction)|797|61|3|2017-06-18T11:18:12Z|2022-01-05T17:43:42Z| (Generators / Miscellaneous Data Structures and Algorithms)
- awesome-go - hyperloglog - HyperLogLog implementation with Sparse, LogLog-Beta bias correction and TailCut space reduction. (Data Structures and Algorithms / Miscellaneous Data Structures and Algorithms)
- my-awesome-stars - axiomhq/hyperloglog - HyperLogLog with lots of sugar (Sparse, LogLog-Beta bias correction and TailCut space reduction) brought to you by Axiom (Go)
- awesome-go - hyperloglog - HyperLogLog implementation with Sparse, LogLog-Beta bias correction and TailCut space reduction. (Data Structures / Advanced Console UIs)
- awesome-go - hyperloglog - HyperLogLog implementation with Sparse, LogLog-Beta bias correction and TailCut space reduction. (Data Structures and Algorithms / Miscellaneous Data Structures and Algorithms)
- awesome-go - hyperloglog - HyperLogLog implementation with Sparse, LogLog-Beta bias correction and TailCut space reduction. (Data Structures / Advanced Console UIs)
- awesome-go-projects - hyperloglog - HyperLogLog implementation with Sparse, LogLog-Beta bias correction and TailCut space reduction. (Data Structures / Standard CLI)
- awesome-go - hyperloglog - Beta bias correction and TailCut space reduction. | - | - | - | (Data Structures / Advanced Console UIs)
- awesome-go-with-framework - hyperloglog - HyperLogLog implementation with Sparse, LogLog-Beta bias correction and TailCut space reduction. (Data Structures / Advanced Console UIs)
- awesome-go - hyperloglog - HyperLogLog implementation with Sparse, LogLog-Beta bias correction and TailCut space reduction. (Data Structures and Algorithms / Miscellaneous Data Structures and Algorithms)
- go-awesome-cn-star - hyperloglog
- awesome-go-cn - hyperloglog - Beta bias correction and TailCut space reduction. [![godoc][D]](https://godoc.org/github.com/axiomhq/hyperloglog) (数据结构与算法 / 杂项数据结构和算法)
- awesome-go-stars - hyperloglog(stars: 906) - HyperLogLog implementation with Sparse, LogLog-Beta bias correction and TailCut space reduction. (Data Structures and Algorithms / Miscellaneous Data Structures and Algorithms)
- awesome-go - hyperloglog - HyperLogLog implementation with Sparse, LogLog-Beta bias correction and TailCut space reduction. (Data Structures / Advanced Console UIs)
- awesome-go - hyperloglog - 具有Sparse,LogLog-Beta偏差校正和TailCut空间缩减的HyperLogLog实施。 (<span id="数据结构-data-structures">数据结构 Data Structures</span> / <span id="高级控制台用户界面-advanced-console-uis">高级控制台用户界面 Advanced Console UIs</span>)
- awesome-go. - hyperloglog - HyperLogLog implementation with Sparse, LogLog-Beta bias correction and TailCut space reduction. (Data Structures / Advanced Console UIs)
- awesome-go-cn - hyperloglog - HyperLogLog implementation with Sparse, LogLog-Beta bias correction and TailCut space reduction. (数据结构 / 高级控制台界面)
- awesome-go-with-stars - hyperloglog - HyperLogLog implementation with Sparse, LogLog-Beta bias correction and TailCut space reduction. (Data Structures and Algorithms / Miscellaneous Data Structures and Algorithms)
- awesome-go - hyperloglog - HyperLogLog implementation with Sparse, LogLog-Beta bias correction and TailCut space reduction. (Data Structures / Advanced Console UIs)
- repo-1316-awesome-go-cn - hyperloglog - Beta bias correction and TailCut space reduction. [![godoc][D]](https://godoc.org/github.com/axiomhq/hyperloglog) (数据结构与算法 / 杂项数据结构和算法)
- repo-1211-awesome-go-cn - hyperloglog - Beta bias correction and TailCut space reduction. [![godoc][D]](https://godoc.org/github.com/axiomhq/hyperloglog) (数据结构与算法 / 杂项数据结构和算法)
- awesome-Char - hyperloglog - HyperLogLog implementation with Sparse, LogLog-Beta bias correction and TailCut space reduction. (Data Structures / Advanced Console UIs)
- awesome-reader - hyperloglog - HyperLogLog implementation with Sparse, LogLog-Beta bias correction and TailCut space reduction. (Data Structures / Advanced Console UIs)
- awesome-go - hyperloglog - HyperLogLog implementation with Sparse, LogLog-Beta bias correction and TailCut space reduction. (Data Structures / Advanced Console UIs)
- Go-awesome - hyperloglog - HyperLogLog implementation with Sparse, LogLog-Beta bias correction and TailCut space reduction. (Data Structures and Algorithms / Miscellaneous Data Structures and Algorithms)
- awesome-go-cn - hyperloglog - Beta bias correction and TailCut space reduction. [![godoc][D]](https://godoc.org/github.com/axiomhq/hyperloglog) (数据结构与算法 / 杂项数据结构和算法)
- awesome-go-cn - hyperloglog - Beta偏差校正和TailCut空间缩减实现。 (HyperLogLog implementation with Sparse, LogLog-Beta bias correction and TailCut space reduction.) (数据结构 / Advanced Console UIs)
- awesome-go - hyperloglog - HyperLogLog implementation with Sparse, LogLog-Beta bias correction and TailCut space reduction. (Data Structures / Advanced Console UIs)
- awesome-go-handwritten - hyperloglog - HyperLogLog implementation with Sparse, LogLog-Beta bias correction and TailCut space reduction. (Data Structures / Advanced Console UIs)
- awesome-go - hyperloglog - HyperLogLog implementation with Sparse, LogLog-Beta bias correction and TailCut space reduction. (數據結構 / 高級控制台界面)
- awesome-go - hyperloglog - HyperLogLog implementation with Sparse, LogLog-Beta bias correction and TailCut space reduction. (Data Structures and Algorithms / Miscellaneous Data Structures and Algorithms)
- awesome-go2 - hyperloglog - HyperLogLog implementation with Sparse, LogLog-Beta bias correction and TailCut space reduction. (Data Structures / Advanced Console UIs)
- awesome-go - hyperloglog - HyperLogLog implementation with Sparse, LogLog-Beta bias correction and TailCut space reduction. (Data Structures / Advanced Console UIs)
- awesome-go - hyperloglog - HyperLogLog implementation with Sparse, LogLog-Beta bias correction and TailCut space reduction. - :arrow_down:6 - :star:585 (Data Structures / Advanced Console UIs)
- awesome-go - hyperloglog - HyperLogLog implementation with Sparse, LogLog-Beta bias correction and TailCut space reduction. (Data Structures / Advanced Console UIs)
- awesome-go-cn - hyperloglog - Beta bias correction and TailCut space reduction. ![star > 100][Bronze] (数据结构 / 高级控制台用户界面)
- awesome-go-zh - hyperloglog - Beta bias correction and TailCut space reduction. [![godoc][D]](https://godoc.org/github.com/axiomhq/hyperloglog) (数据结构与算法 / 杂项数据结构和算法)
- awesome-go - hyperloglog - HyperLogLog implementation with Sparse, LogLog-Beta bias correction and TailCut space reduction. (Data Structures and Algorithms / Miscellaneous Data Structures and Algorithms)
- awesome-go - hyperloglog - HyperLogLog implementation with Sparse, LogLog-Beta bias correction and TailCut space reduction. (Data Structures and Algorithms / Miscellaneous Data Structures and Algorithms)
- awesome-go - hyperloglog - HyperLogLog with lots of sugar (Sparse, LogLog-Beta bias correction and TailCut space reduction) - ★ 617 (Data Structures)
README
HyperLogLog - an algorithm for approximating the number of distinct elements
---[![GoDoc](https://godoc.org/github.com/axiomhq/hyperloglog?status.svg)](https://godoc.org/github.com/axiomhq/hyperloglog) [![Go Report Card](https://goreportcard.com/badge/github.com/axiomhq/hyperloglog)](https://goreportcard.com/report/github.com/axiomhq/hyperloglog) [![CircleCI](https://circleci.com/gh/axiomhq/hyperloglog/tree/master.svg?style=svg)](https://circleci.com/gh/axiomhq/hyperloglog/tree/master)
An improved version of [HyperLogLog](https://en.wikipedia.org/wiki/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"](http://cse.seu.edu.cn/PersonalPage/csqjxiao/csqjxiao_files/papers/INFOCOM17.pdf).
## 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 convenienceIn general it borrows a lot from [InfluxData's fork](https://github.com/influxdata/influxdb/tree/master/pkg/estimator/hll) of [Clark Duvall's HyperLogLog++ implementation](https://github.com/clarkduvall/hyperloglog), but uses **50% less space**.
## Results
A direct comparison with the [HyperLogLog++ implementation used by InfluxDB](https://github.com/influxdata/influxdb/tree/master/pkg/estimator/hll) 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".## Contributing
Kindly check our [contributing guide](https://github.com/axiomhq/hyperloglog/blob/main/Contributing.md) on how to propose bugfixes and improvements, and submitting pull requests to the project
## License
© Axiom, Inc., 2022
Distributed under MIT License (`The MIT License`).
See [LICENSE](LICENSE) for more information.