logoalt Hacker News

Probabilistic Data Structures in Go

29 points • by mfrw • yesterday at 1:29 PM • 3 comments • view on HN

Comments

ncruces • yesterday at 11:45 PM

I'm in the process of adding a few of these to my Go SQLite driver.

https://pkg.go.dev/github.com/ncruces/go-sqlite3/ext/approx

They work as window functions, and they also support creating roll-up tables, e.g. you have a table storing a sketch of daily active users and can use that to get weekly and monthly active users.

Same for quantiles (e.g. median and tail latencies) and next up top-K (e.g. most popular content, highest spenders, etc).

jpitz • yesterday at 10:03 PM

My introduction to probabilistic data structures was Pugh's skip list, which is probabilistic in structure and performance, but precise with answers.

aarjaneiro • yesterday at 10:43 PM

Note a lot of the diagrams seem broken