{
  "id": 21053878,
  "title": "Probabilistic data structures in Go, part 2",
  "url": "https://urgent.news/2026/11/21/probabilistic-data-structures-in-go-part-2",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-21T13:18:02.000Z",
  "source": {
    "name": "Lobsters",
    "slug": "lobsters",
    "url": "https://antonz.org/probabilistic-data-structures-2/"
  },
  "original_language": "en",
  "account": "Probabilistic data structures provide approximate answers to questions about the data they process, using less memory than deterministic structures. This article explores several probabilistic structures and compares them to those previously discussed.\n\nBinary Fuse Filter\nA binary fuse filter is a set that offers a trade-off between certainty and memory usage, similar to a Bloom filter. It can affirm that an item is definitely not in the set or that it probably is (which may be a false positive). Unlike a Bloom filter, a binary fuse filter is static, built once from all the items and cannot be altered later. It employs less memory than a Bloom filter with the same false positive rate. For instance, a binary fuse filter containing 1,000,000 items with a 0.39% false positive rate requires 1.13 MB (9 bits per item), whereas a Bloom filter with the same parameters needs 1.51 MB (12 bits per item). This makes binary fuse filters ideal for data that is written once and read many times, such as the key set of an immutable file in a database or a list of known bad items.\n\nUltraLogLog\nUltraLogLog is a unique items counter that sacrifices accuracy for memory efficiency, comparable to HyperLogLog. It estimates the number of distinct items seen, regardless of how often each item appeared. Unlike HyperLogLog, UltraLogLog requires about 43% less memory for the same error level. For example, a HyperLogLog sketch with a 0.81% standard error demands 16 KB, while an UltraLogLog sketch with a 0.86% error rate takes up 8 KB. However, adding, counting, and merging operations are slower with UltraLogLog than with HyperLogLog. UltraLogLog is particularly useful in scenarios where you need to count unique visitors, search queries, or distinct values in a database column, potentially across multiple machines or segments, and where merging sketches is necessary to obtain the total count of unique items without double-counting shared items.\n\nUltraLogLog operates with a precision parameter p, which determines a relative standard error of 0.782/√(2^p), with 0.86% error in 8 KB being the default setting. You can add items, estimate the count, and merge sketches, but you cannot check if a specific item was added, delete items, or list them. UltraLogLog utilizes the local wyhash implementation for hashing and performs hashing similarly to xxHash but with a simpler implementation, lacking SIMD or assembly optimizations.",
  "summary": null,
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}