gpt4 book ai didi

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

转载 作者:塔克拉玛干 更新时间:2023-11-03 03:15:51 24 4
gpt4 key购买 nike

有什么地方可以让我对传统数据结构(如链表、各种树、哈希等)与缓存感知数据结构(如 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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com