Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #91235

"Inside STL: The unordered_map, unordered_set, unordered_multimap, and unordered_multiset" by Raymond Chen

From Lynn McGuire <lynnmcguire5@gmail.com>
Newsgroups comp.lang.c++
Subject "Inside STL: The unordered_map, unordered_set, unordered_multimap, and unordered_multiset" by Raymond Chen
Date 2023-08-09 15:05 -0500
Organization A noiseless patient Spider
Message-ID <ub0rhv$28f2$1@dont-email.me> (permalink)

Show all headers | View raw


"Inside STL: The unordered_map, unordered_set, unordered_multimap, and 
unordered_multiset" by Raymond Chen
    https://devblogs.microsoft.com/oldnewthing/20230808-00/

"The C++ standard library provides hash-based associative containers 
unordered_map, unordered_set, unordered_multimap, and unordered_multiset."

"All of these collections are hash tables with different payloads. The 
unordered_map and the unordered_multimap use a std::pair<Key, Value> as 
the payload, whereas the the unordered_set and the unordered_multiset 
use a Key as the payload."

"Conceptually, the hash table consists of a bunch of buckets, and each 
bucket contains a linked list of the nodes that fall into that bucket. 
(This design is known as open hashing or separate chaining.) However, 
that’s not how the information is structured internally, because 
iterating through a traditionally-structured hash table requires more 
state than a single pointer: When you reach the end of each hash chain, 
you need some other information to tell you which chain to enumerate next."

We have used none of these in our software.

Lynn

Back to comp.lang.c++ | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

"Inside STL: The unordered_map, unordered_set, unordered_multimap, and unordered_multiset" by Raymond Chen Lynn McGuire <lynnmcguire5@gmail.com> - 2023-08-09 15:05 -0500
  Re: "Inside STL: The unordered_map, unordered_set, unordered_multimap, and unordered_multiset" by Raymond Chen Tim Rentsch <tr.17687@z991.linuxsc.com> - 2023-08-15 08:53 -0700
    Re: "Inside STL: The unordered_map, unordered_set, unordered_multimap, and unordered_multiset" by Raymond Chen Lynn McGuire <lynnmcguire5@gmail.com> - 2023-08-16 16:51 -0500
      Re: "Inside STL: The unordered_map, unordered_set, unordered_multimap, and unordered_multiset" by Raymond Chen "Alf P. Steinbach" <alf.p.steinbach@gmail.com> - 2023-08-17 00:03 +0200
        Re: "Inside STL: The unordered_map, unordered_set, unordered_multimap, and unordered_multiset" by Raymond Chen Lynn McGuire <lynnmcguire5@gmail.com> - 2023-08-16 17:33 -0500
      Re: "Inside STL: The unordered_map, unordered_set, unordered_multimap, and unordered_multiset" by Raymond Chen Tim Rentsch <tr.17687@z991.linuxsc.com> - 2023-08-16 19:34 -0700

csiph-web