[libcxx-commits] [PATCH] D154164: Cleanup __uninitialized_temporary_buffer internals.

Eric Fiselier via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jun 29 15:43:38 PDT 2023


EricWF created this revision.
Herald added a project: All.
EricWF requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

There are a few improvements this patch makes. First, it only
uses aligned allocation when the type actually requires it. This
addresses a sizable user-reported performance regression in some of the
algorithms.

Second, it removes a significant amount unused template & function parameters,
which improves code size and makes the type less error prone and more readable.

And finally, it fixes a bug where operator new/delete were being called
directly, rather than as a builtin -- preventing the compiler from
eliding the allocation.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D154164

Files:
  libcxx/include/__algorithm/inplace_merge.h
  libcxx/include/__algorithm/stable_partition.h
  libcxx/include/__algorithm/stable_sort.h
  libcxx/include/__memory/uninitialized_buffer.h
  libcxx/include/new

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D154164.536039.patch
Type: text/x-patch
Size: 7917 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230629/f5ba2b43/attachment-0001.bin>


More information about the libcxx-commits mailing list