~/talk

No, Maybe and Close Enough: Using Probabilistic Data Structures in Python

Talkat PyCon US 2021 · 2021-05-14..05-15· [databases]
slides:none on file

Shows concrete trade-offs: use Hyperloglog to approximate distinct counts (100000 items produce ~99,565 with about 12k of memory vs a set at ~100000 and ~4.6MB), and use Bloom filter for membership queries that return definite negatives or probabilistic positives with tunable false‑positive rates. Examples use Python libraries and redis modules (pfadd/pfcount, BF.RESERVE), include a GitHub repo (https://github.com/simonprickett/python-probabilistic-data-structures), and demonstrates when accuracy versus memory wins.

AI-written summary · about

  1. 0:00Introduction
  2. 0:23The Problem
  3. 8:56Probabilistic Data Structures
  4. 9:39Hyperlog Log
  5. 11:50Hyperlog Log Algorithm
  6. 12:25Hyperlog Log Example
  7. 15:26Bloom Filter
  8. 20:33Python Code
  9. 22:51When to Use
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.