TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: When are large data structures used in practice?

8 点作者 rtheunissen大约 5 年前
Can anyone share some practical examples where it is a requirement to maintain 1M+ elements in a data structure when streams and iterators are not a viable alternative?<p>Using a vector as an example, where O(n) operations are actually very fast in practice when n &lt; X, when might X be big enough in practice to warrant the use of other specialized structures like skip lists and radix-balanced trees?

5 条评论

shoo大约 5 年前
How about cases where the data structures need to support &quot;interesting&quot; query operations. E.g. data structures to support spatial queries: &quot;find me all the neighbouring elements within a radius r of element x&quot;. Not super-specialised, but probably need something like a quadtree or a hash table or other indices to help partition the search space. There can easily be 1M+ elements if each element is an address in state &#x2F; national address database, or a component of some utility network, or a location of an app user. There are use cases where you&#x27;d want to be able to execute these kinds of queries with low latency, so jamming everything into ram in an appropriate data structure could be a good fit.
posnet大约 5 年前
Any sort of DNA processing. There is a lot of research into concise data structures for a very specific set of operations for DNA processing since our ability to generate DNA data is accelerating much master than processing or memory speed.
评论 #22774646 未加载
wsh大约 5 年前
Here’s one example:<p>In the IPv4 Internet, there are about 830,000 prefixes (network addresses) announced, and the number is growing [1]. Routers at ISPs and sophisticated customers maintain full (“default-free”) routing tables with at least one entry for each prefix.<p>These tables are used for packet forwarding decisions, so lookups have to be fast. Traditionally, a radix tree is used, but some routers use other data structures or specialized hardware.<p>[1] <a href="https:&#x2F;&#x2F;www.cidr-report.org&#x2F;as2.0&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.cidr-report.org&#x2F;as2.0&#x2F;</a>
评论 #22774659 未加载
ecesena大约 5 年前
Not sure if this fits the example you have in mind: <a href="https:&#x2F;&#x2F;medium.com&#x2F;pinterest-engineering&#x2F;an-update-on-pixie-pinterests-recommendation-system-6f273f737e1b" rel="nofollow">https:&#x2F;&#x2F;medium.com&#x2F;pinterest-engineering&#x2F;an-update-on-pixie-...</a><p>&gt; The ultimate goal is to fit the entire Pinterest graph in memory. Obviously we can’t fit the entire 100 billion edges in RAM, but once we prune down to 20 billion edges, we end up with a graph that’s 150GB.
arduinomancer大约 5 年前
Do you mean specifically 1M elements in memory?<p>Because something like a relational database could have 1M elements in a B-tree but the whole data structure doesn&#x27;t have to be in memory at the same time.<p>Or operating system page tables as another example.
评论 #22765856 未加载