It wasn't clear to me how Cuckoo hash tables are supposed to work if both locations are full. Here is the relevant explanation from Wikipedia : > The new key is inserted in one of its two possible locations, "kicking out", that is, displacing, any key that might already reside in this location. This displaced key is then inserted in its alternative location, again kicking out any key that might reside there. The proc…
Ah, O(wildly erratic) insertion. Great for that jittery feel to your programs.
Classical data structures that can outperform learned indexes (2018)
21–30 of 43 posts
Re: Classical data structures that can outperform learned indexes (2018)
#22It wasn't clear to me how Cuckoo hash tables are supposed to work if both locations are full. Here is the relevant explanation from Wikipedia : > The new key is inserted in one of its two possible locations, "kicking out", that is, displacing, any key that might already reside in this location. This displaced key is then inserted in its alternative location, again kicking out any key that might reside there. The proc…
Ah, O(wildly erratic) insertion. Great for that jittery feel to your programs.
Re: Classical data structures that can outperform learned indexes (2018)
#23Earlier quoted context omitted.
Ah, O(wildly erratic) insertion. Great for that jittery feel to your programs.
Most popular data structures only provide average case guarantees with bad worst-case bounds. Dynamic arrays also have O(wildly erratic) append. I think for most use cases this is perfectly fine and does not result in any perceivable jitter in programs.
Re: Classical data structures that can outperform learned indexes (2018)
#24Earlier quoted context omitted.
Most popular data structures only provide average case guarantees with bad worst-case bounds. Dynamic arrays also have O(wildly erratic) append. I think for most use cases this is perfectly fine and does not result in any perceivable jitter in programs.
They do in fact not have erratic behavior, they are quite predictable. The cuckooing process, on the other hand, is not predictable by design.
Re: Classical data structures that can outperform learned indexes (2018)
#25Due to cache locality, cuckoo hashing usually underperforms compared to linear probing hash tables, except when you want super high density and you don't expect to do much inserting. It gets especially bad if the keys or values are large. 99% of the time, you're better off with something other than cuckoo hashing.
Re: Classical data structures that can outperform learned indexes (2018)
#26Re: Classical data structures that can outperform learned indexes (2018)
#27As I read this I thought "interesting. I would have thought probing would be better on modern computers with memory pre-fetching"... Then I come to the comments and find out im not the only one thinking that.
Re: Classical data structures that can outperform learned indexes (2018)
#28Earlier quoted context omitted.
They do in fact not have erratic behavior, they are quite predictable. The cuckooing process, on the other hand, is not predictable by design.
Recently went on a deep dive about sorting algorithm actual predictability and for latency-sensitive workloads, most things you'd use because 'simple/standard' (quicksort, mergesort...) don't shine, with their horrid /worst case/ complexity, but also depending a lot on your input data. Quicksort with a badly chosen pivot, for example, has caused me headaches recently.
Re: Classical data structures that can outperform learned indexes (2018)
#29The learned index paper struck me as a bit of a marketing gimmick, but this paper also smells a bit. The central sleight of hand that both papers pull without admitting it is that they are creating mostly-read data structures (or in the first half of the learned index paper, read-only data structures). The learned index paper then compares them to read-write data structures and claims a win. Due to cache locality, cu…