http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54075
James Y Knight <foom at fuhm dot net> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |foom at fuhm dot net
--- Comment #34 from James Y Knight <foom at fuhm dot net> 2012-11-04 04:55:30
UTC ---
Well, I haven't looked into this issue in detail, but, it looks like everyone
is about the same speed if you put a foo.{reserve or rehash}(n) before the
inserts.
Unfortunately, it doesn't look as simple as the new impl calling for a rehash
more often than the old, cause it's not. So, I don't know if the slowness is
because rehash is now a lot slower, or if insert is slower but only if there
aren't a huge number of empty buckets.
I'll also note that libc++'s implementation (seen here:
http://llvm.org/svn/llvm-project/libcxx/trunk/) appears to be getting the same
speed as the old libstdc++ implementation, while appearing to have
approximately the same bucket datastructure as the new libstdc++
implementation. That says to me that it should be *possible* somehow to make
the new version fast.