[libcxx-commits] [PATCH] D61878: Use is_permutation when comparing containers

Zoe Carver via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon May 13 16:51:54 PDT 2019


zoecarver created this revision.
zoecarver added reviewers: mclow.lists, EricWF.
Herald added subscribers: libcxx-commits, ldionne.

This patch simplifies the comparison of containers by passing `is_permutation` all container elements at once. Because of how brilliantly `is_permutation` is written, this can speed up the comparison of containers by 15x. Here is a quick and dirty speed comparison I made. <https://gist.github.com/zoecarver/eaed954648f754d778c53835daea1de6>


Repository:
  rCXX libc++

https://reviews.llvm.org/D61878

Files:
  include/unordered_map
  include/unordered_set

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61878.199348.patch
Type: text/x-patch
Size: 10554 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20190513/afaf1207/attachment-0001.bin>


More information about the libcxx-commits mailing list