3 ms·
Wouldn't it be better to have one tree containing compound keys rather than subtrees? Often trees have a lot of overhead so a tree of trees could be rather inef
by bjourne 9y ago
Wouldn't it be better to have one tree containing compound keys rather than subtrees? Often trees have a lot of overhead so a tree of trees could be rather inefficient. It would also be hard to balance.
- btown 9y agoEffectively this is the same; at a sufficient diversity of the first element in the compound key, you'll have almost as many tree nodes as you would if you considered them subtrees. It can be intuitively easier to think of them as subtrees, though, and that was my point; it's not necessary to know all the implementation details, just generally how the system finds data.