This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug libstdc++/54075] [4.7.1] unordered_map 3x slower than 4.6.2


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54075

--- Comment #13 from FranÃois Dumont <fdumont at gcc dot gnu.org> 2012-07-26 12:31:56 UTC ---
Author: fdumont
Date: Thu Jul 26 12:31:50 2012
New Revision: 189889

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=189889
Log:
2012-07-26  FranÃois Dumont  <fdumont@gcc.gnu.org>

    PR libstdc++/54075
    * include/bits/hashtable.h
    (_Hashtable<>::_Hashtable(_InputIterator, _InputIterator,
    size_type, ...): Remove std::max usage to guarantee that hashtable
    state is consistent with hash policy state.
    (_Hashtable<>::rehash): Likewise. Set _M_prev_resize to 0 to avoid
    the hashtable shrinking on next insertion.
    * testsuite/23_containers/unordered_set/modifiers/reserve.cc: New.
    * testsuite/23_containers/unordered_multiset/modifiers/reserve.cc: New.
    * testsuite/23_containers/unordered_map/modifiers/reserve.cc: New.
    * testsuite/23_containers/unordered_multimap/modifiers/reserve.cc: New.

Added:
   
branches/gcc-4_7-branch/libstdc++-v3/testsuite/23_containers/unordered_map/modifiers/reserve.cc
   
branches/gcc-4_7-branch/libstdc++-v3/testsuite/23_containers/unordered_multimap/modifiers/reserve.cc
   
branches/gcc-4_7-branch/libstdc++-v3/testsuite/23_containers/unordered_multiset/modifiers/reserve.cc
   
branches/gcc-4_7-branch/libstdc++-v3/testsuite/23_containers/unordered_set/modifiers/reserve.cc
Modified:
    branches/gcc-4_7-branch/libstdc++-v3/ChangeLog
    branches/gcc-4_7-branch/libstdc++-v3/include/bits/hashtable.h


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