How Count-Min Sketches Work – Frequencies, but Without the Actual Data
Posted2 months agoActive2 months ago
instantdb.comTechstory
calmpositive
Debate
20/100
Data StructuresProbabilistic AlgorithmsDatabase Design
Key topics
Data Structures
Probabilistic Algorithms
Database Design
The article explains count-min sketches, a probabilistic data structure for estimating frequencies without storing actual data, sparking discussion on its applications and trade-offs.
Snapshot generated from the HN discussion
Discussion Activity
Light discussionFirst comment
1h
Peak period
4
28-30h
Avg / period
1.8
Key moments
- 01Story posted
Oct 22, 2025 at 12:27 PM EDT
2 months ago
Step 01 - 02First comment
Oct 22, 2025 at 1:31 PM EDT
1h after posting
Step 02 - 03Peak activity
4 comments in 28-30h
Hottest window of the conversation
Step 03 - 04Latest activity
Oct 23, 2025 at 6:39 PM EDT
2 months ago
Step 04
Generating AI Summary...
Analyzing up to 500 comments to identify key contributors and discussion patterns
ID: 45671569Type: storyLast synced: 11/20/2025, 1:51:04 PM
Want the full context?
Jump to the original sources
Read the primary article or dive into the live Hacker News thread when you're ready.
Since all the reactive demos are local, I didn't add Instant in this case.
One little trick I did for data was here:
https://github.com/instantdb/instant/blob/main/client/www/co...
Mainly: I wanted to get all counts for Wodehouse, but didn't want to block the page load for that. So what I did was take a small subset of the data that's needed to render the page, and have that written into the file. Then after load I fetch all the other counts.
In the tutorial I also used Bun.xxHash3, but to make sketches run on the client, I had to replace that with a library.
The actual sketch implementation that backs the demos is here:
https://github.com/instantdb/instant/blob/main/client/www/co...