From: Gary Powell (Gary.Powell_at_[hidden])
Date: 2001-01-08 17:37:51
> > I've never been big on general-purpose hashtables, as a
> > tree-based set or map provides the same interface and
> > more, and reasonable average and worst case performance,
> > whereas a hashtable can have truly terrible worst case
> > performance.
> Is this a reason for not giving the user a choice? Given a hash_map, I can
> evaluate its performance in the particular situation I'm interested in and
> decide whether I want a hash_map or an ordinary map.
> In many cases the hash_map wins by an order of magnitude.
If my data needs to be ordered, I use a map, if only randomly accessed, I
use the hash_map. (A resonable hash_function, plus resonable size of the
table, by rehashing with a new lookup table size will often fix that worst
Anyway, when I needed a tree, I coded a AVL, as it was easier. Now I use set
and map, as they come with. Takes a real performance penalty to get me to
code a new container these days.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk