unsure

module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2026 License: MIT

README

unsure: Probabilistic data structures in Go

Probabilistic data structures give you approximate answers to questions about the data they handle. Does the set contain a certain item? How many unique items are in the collection? Which items appear most often? Unlike regular data structures, the answers might not be exact, and you can choose the acceptable error rate.

The unsure module implements probabilistic data structures in Go. It's simple (the core logic for each data structure is 100–300 LOC), fast (usually several times faster than other implementations), and has no dependencies except for the standard library.

Data structures

All data structures use the local wyhash implementation for hashing. It performs roughly the same as xxh3 but has a much simpler implementation, without SIMD or assembly.

Contributing

If there's a feature you need that's missing, please open an issue to discuss it. Only open issues for real use cases you actually have, not for hypothetical situations or features that would just be nice to have.

If you find a bug, open an issue or send a PR. Please don't send PRs with new features — open an issue instead.

License

Created by Anton Zhiyanov. Released under the MIT License.

Directories

Path Synopsis
Package bloom implements a fast blocked Bloom filter.
Package bloom implements a fast blocked Bloom filter.
Package countmin implements a Count-min sketch with conservative update.
Package countmin implements a Count-min sketch with conservative update.
Package hll implements HyperLogLog with Ertl's improved estimator.
Package hll implements HyperLogLog with Ertl's improved estimator.
internal
wyhash
Package wyhash is a port of wyhash final 4.3 by Wang Yi, Unlicense (github.com/wangyi-fudan/wyhash).
Package wyhash is a port of wyhash final 4.3 by Wang Yi, Unlicense (github.com/wangyi-fudan/wyhash).
Package tdigest implements the merging t-digest with the arcsine scale function.
Package tdigest implements the merging t-digest with the arcsine scale function.
Package topk implements HeavyKeeper for finding the most frequent items in a stream.
Package topk implements HeavyKeeper for finding the most frequent items in a stream.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL