7 ms·
> But the amortized O(1) lookup of hash tables is hard to beat. On the other hand: the performance characteristics of trees are much easier to predict. And in
by throwawayish 10y ago
> But the amortized O(1) lookup of hash tables is hard to beat.
On the other hand: the performance characteristics of trees are much easier to predict.
And in many cases a HT lookup isn't distinguishable from a tree lookup, at least if it's a dedicated application data structure, like some index or so.
I feel like HTs are very good for smaller structures (excellent example: dictionary/hashtable-based interpreters), but for larger data structures (e.g.: indices) ... not so much.