[Bug libstdc++/50257] [C++0x] unordered_map slow initialization due to huge __prime_list
justin at fathomdb dot com
gcc-bugzilla@gcc.gnu.org
Tue Sep 6 15:57:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50257
--- Comment #15 from Justin SB <justin at fathomdb dot com> 2011-09-06 15:55:31 UTC ---
That patch works for me - thanks; gcc optimizes away the array lookup.
I do still think that constexpr could be helpful here: every lookup for an
explicit (or default) unordered_map size would then be optimized away (not just
those <= 11), but constexpr is still new to me so I'm not sure of the
behavioural nuances. I do think it should definitely be optimized away in my
test case, but that's a separate issue.
Thanks again for fixing.
More information about the Gcc-bugs
mailing list