[PATCH] D16360: unordered_map: Avoid unnecessary mallocs when no insert occurs
Duncan P. N. Exon Smith via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 1 18:15:48 PST 2016
dexonsmith added a comment.
Marshall, thanks for the link to #2464. That does look scary.
Nevertheless, I think this -- and the other over-eager allocations
in {unordered_,}{multi,}{map,set} -- are worth optimizing as long
as we can do it in a standards-compliant way. It's a pretty serious
regression in performance compared to expectations from C++03's
insert().
Let me know if you can think of some testing I can add to be sure
I'm not breaking anything (maybe test/std/.../ doesn't have enough
coverage?).
http://reviews.llvm.org/D16360
More information about the cfe-commits
mailing list