Article View: comp.std.c++
Article #2429Re: STL Hash Classes
From: Alex Martelli
Date: Mon, 06 Nov 1995 00:09
Date: Mon, 06 Nov 1995 00:09
31 lines
1939 bytes
1939 bytes
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. ]
Technical Details
Message-ID:
<martelli.815480308@cadlab>Path:
arc1-ca.pugleaf.net!tcsi.tcs.com!agate!agate!MattReferences:
<47bg5r$euh$1@mhafn.production.compuserve.com> <47cdvh$p0j@natasha.rmii.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!tcsi.tcs.com!agate!agate!Matt From: martelli@cadlab.it (Alex Martelli) Newsgroups: comp.std.c++ Subject: Re: STL Hash Classes Date: 06 Nov 1995 00:09:50 GMT Organization: Cad.Lab Spa, Bologna, Italia Approved: Matt@Austern Message-ID: <martelli.815480308@cadlab> References: <47bg5r$euh$1@mhafn.production.compuserve.com> <47cdvh$p0j@natasha.rmii.com> NNTP-Posting-Host: austern.hip.berkeley.edu