Crate hypertwobits

source ·
Expand description

HyperTwoBits is a probabilistic data structure that estimates the number of distinct elements in a set. It has the same use case as HyperLogLog, but it uses less memory and is faster while achiving a roughly similar precision. similar accuracy.

This implementation holds the entire sketch in the stack without heap allocations. It defaults to ahash for hashing, but you can use any hasher that implements std::hash::Hasher.

use hypertwobits::{h2b::HyperTwoBits, h2b::M512};
let mut htb = HyperTwoBits::<M512>::default();
htb.insert(&"foo");
htb.insert(&"bar");
htb.count();

Re-exports§

Modules§

  • HyperTwoBits implementation
  • HyperThreeBits implementation
  • HyperBitBit64 implementation
  • Prelude for easy importing

Structs§

Type Aliases§