(no title)
rewmie | 2 years ago
https://opendatastructures.org/ods-cpp/10_1_Implicit_Binary_...
I dare say that no tree data structure beats Eytzinger's method in cache locality.
rewmie | 2 years ago
https://opendatastructures.org/ods-cpp/10_1_Implicit_Binary_...
I dare say that no tree data structure beats Eytzinger's method in cache locality.
amluto|2 years ago
Cache locality is good toward the leaves and bad everywhere else. This is why binary search on a sorted array is actually quite slow.
ORC in Linux, for example, was first prototyped as a sorted array of little structures. It got much faster by adding an auxiliary index giving O(1) access to a credible starting point for a search.
funcDropShadow|2 years ago
1. That depends on the operation performed. I'd say cache-locality is near perfect for depth-traversal.
2. Whether the effective performance of the cache is good or bad depends on the alternative. If the alternative is adding two 64 bit pointer to every 32 bit value in the tree node. And each of those node may be spread through out the heap. Then this representation starts to look quite good.
ulatich|2 years ago
bjourne|2 years ago