TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

This hash table uses less space than the items it stores

35 pointsby williamkuszmaulover 2 years ago

5 comments

bicsiover 2 years ago
Isn’t this just a trie with only two levels? It seems to me that this technique isn’t particularly unknown, as it’s taught in most elementary CS courses.
评论 #33147319 未加载
评论 #33147388 未加载
omegalulwover 2 years ago
Maybe I'm missing something obvious, but if I insert all 32 bit keys, does that not take 32*2^32 space?
评论 #33147450 未加载
评论 #33147475 未加载
perryizgr8over 2 years ago
Kind of reminds me of a patricia trie, which is used to store routing tables. Each prefix exists as a path you take from one node to the other.
marginalia_nuover 2 years ago
Neat. I have an order-of-gigabytes hash table I'd love to shrink. Will experiment with this technique.
pshirshovover 2 years ago
This is just a classic combination of trie with hashmap.