algorithm - Big-O 和缓存感知数据结构和算法

标签 algorithm data-structures caching big-o

有什么地方可以让我对传统数据结构(如链表、各种树、哈希等)与缓存感知数据结构(如 Judy 树等)进行 Big-O 风格分析/比较?

最佳答案

其实,

我会看here用于分析朱迪树。

As illustrated in this data, Judy's smaller size does not give it an enormous speed advantage over a traditional "trade size for speed" data structure. Judy has received countless man-hours developing and debugging 20,000 lines of code; I spent an hour or three writing a fairly standard 200-line hash table.

If your data is strictly sequential; you should use a regular array. If your data is often sequential, or approximately sequential (e.g. an arithmetic sequence stepping by 64), Judy might be the best data structure to use. If you need to keep space to a minimum--you have a huge number of associative arrays, or you're only storing very small values, Judy is probably a good idea. If you need an sorted iterator, go with Judy. Otherwise, a hash table may be just as effective, possibly faster, and much simpler.

关于algorithm - Big-O 和缓存感知数据结构和算法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1957527/

相关文章:

c - 质数生成算法

c - 在 BST 中找到给定总和的一对

c++ - 可以分段的基于散列的数据容器 - C++

java - 如何将不同类型的对象添加到 Android 中的 HashMap 中?

android无法从缓存目录打开pdf

Java反向传播算法非常慢

java - 俄罗斯方 block AI - 理解广度优先搜索的问题

iOS 心率检测算法

java - 在java中同时使多个worker的缓存无效而不影响性能

ruby-on-rails - 为具有 has_many 关系的俄罗斯娃娃缓存构建 Rails 应用程序