Topic: STL Hash Classes


Author: John.I.Moore@mhafn.production.compuserve.com,
Date: 1995/11/02
Raw View
Can any one tell me the status of the STL associative containers
based on hash tables (e.g., hash_set, hash_map, etc.)?  In
particular, will they be part of final C++ standard?  I certainly
hope so, but I would like to know if they are being given strong
consideration for the next revision of the standard.  I was
surprised when I discovered them missing from the draft.

--
John I. Moore, Jr.  Object-Oriented Training
SoftMoore Consulting  and Consulting Services
70672.1744@compuserve.com

---
[ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy
  is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]





Author: jcoffin@rmii.com (Jerry Coffin)
Date: 1995/11/03
Raw View
John.I.Moore@mhafn.production.compuserve.com, "Jr."
<70672.1744@CompuServe.COM> wrote:

>Can any one tell me the status of the STL associative containers
>based on hash tables (e.g., hash_set, hash_map, etc.)?  In
>particular, will they be part of final C++ standard?  I certainly
>hope so, but I would like to know if they are being given strong
>consideration for the next revision of the standard.  I was
>surprised when I discovered them missing from the draft.

I haven't seen anything recent.  This reminds me of something I'd meant
to ask about: might there be interest in a hybrid container providing
roughly the expected efficiency of a hash table along with the worst
case efficiency of existing STL containers?  It would still lose the
ability to iterate in a specified order efficiently, so I'm curious
whether the efficiency or ordered iteration is seen as the primary
drawback to hash tables.
    Later,
    Jerry.

/* I can barely express my own opinions; I certainly can't
 * express anybody else's.
 *
 * The universe is a figment of its own imagination.
 */
---
[ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy
  is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]





Author: martelli@cadlab.it (Alex Martelli)
Date: 1995/11/06
Raw View
jcoffin@rmii.com (Jerry Coffin) writes:
 ...
>to ask about: might there be interest in a hybrid container providing
>roughly the expected efficiency of a hash table along with the worst
>case efficiency of existing STL containers?  It would still lose the
>ability to iterate in a specified order efficiently, so I'm curious
>whether the efficiency or ordered iteration is seen as the primary

As far as I'm concerned, 9 times out of 10 my applications do not care
about the order of iteration within such data structures as sets and maps,
i.e. collections that are inherently unordered from an abstract point
of view; therefore, if I was given the choice at each point between
using standard implementations with the same worst-case bounds, where
one is much faster on the average and the other one supplies some
guaranteed order of iteration, I would almost always go with the faster
solution (hmm, assuming similar costs in terms of space too, of course).


Alex
--
DISCLAIMER: these are TOTALLY personal opinions and viewpoints, NOT connected
in any way with my employer, nor any other organization or individual!
Email: martelli@cadlab.it                            Phone: +39 (51) 597313
CAD.LAB s.p.a., v. Ronzani 7/29, Casalecchio, Italia   Fax: +39 (51) 597120


---
[ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy
  is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]