[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
Fri Mar 11 19:27:48 PST 2016


dexonsmith updated this revision to Diff 50514.
dexonsmith added a comment.

A few updates:

- Rebased on top of http://reviews.llvm.org/D18115.
- Rewrote the test to match suggested style.
- Updated the code to catch unordered_set::emplace as well, using a __can_extract_key trait and a companion __extract_key functor.

Sorry for the latency reposting; let me know how this looks.


http://reviews.llvm.org/D16360

Files:
  include/__hash_table
  test/libcxx/containers/unord/unord.map/insert_dup_alloc.pass.cpp
  test/libcxx/containers/unord/unord.set/insert_dup_alloc.pass.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16360.50514.patch
Type: text/x-patch
Size: 7640 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160312/0bb6e8d6/attachment-0001.bin>


More information about the cfe-commits mailing list