[libcxx-commits] [PATCH] D121492: [libc++] Fix performance inconsistency between unordered_map copy-assignment and copy-construction
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Mar 11 13:49:20 PST 2022
ldionne created this revision.
Herald added a project: All.
ldionne requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.
We were not rehashing the hash table before performing assignment, which
resulted in greatly sub-optimal performance when compared to the
otherwise equivalent copy constructor.
This patch also adds a test that will start failing should a performance
difference be reintroduced in the future.
rdar://89335436
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D121492
Files:
libcxx/include/__hash_table
libcxx/include/unordered_map
libcxx/include/unordered_set
libcxx/test/libcxx/containers/unord/perf.assignment_vs_construction.pass.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D121492.414742.patch
Type: text/x-patch
Size: 8421 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220311/26a1054b/attachment-0001.bin>
More information about the libcxx-commits
mailing list