Bart Lateur wrote:
> But isn't there going to be a large overhead, in populating such a
> "hash"?
If you need an ordered data structure the overhead would be lower
than using a hash.
> Doesn't the tree have to be reorganized every time you add a
> single new entry?
No. Sometimes you may have to re-balance the tree, but that only
requires examining the path to the item, not the entire tree. BTW,
inserting into a hash also requires occasional reorganization. You
want to keep both the number of buckets and collisions small, which
forces reorganization as a hash grows.
> Reading can be fast, I grant you.
Faster than hashes sometimes.
Anyways, hash syntax can be used to interface to balanced trees so
there isn't any reason to debate them.
- Ken