This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: max_load_factor constant complexity


On 30/06/15 22:25 +0200, François Dumont wrote:
Hi

   During a recent discussion on Reflector about max_load_factor some
pointed that libstdc++ has not the constant complexity as imposed by the
Standard in Table 103 because we try to respect the new factor by
potentially rehashing the container. This patch fix this problem by
adopting VS Standard Library behavior of retaining the targeted
max_load_factor and comply to it as soon as possible on insertion.

   * include/bits/hashtable.h (_Hashtable<>::__rehash_policy): Remove
   container rehash.
   * testsuite/23_containers/unordered_set/max_load_factor/robustness.cc:
   Adapt.

Tested under linux x86_64.

Ok to commit ?

OK, thanks.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]