[libcxx-commits] [PATCH] D72987: Add basic_string::__assign_str_noalias_external(const value_type* s, size_type n)
Martijn Vels via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Jan 18 14:07:45 PST 2020
mvels created this revision.
mvels added a reviewer: EricWF.
Herald added subscribers: libcxx-commits, christof.
Herald added a project: libc++.
This change introduces the `__assign_str_noalias_external` which is invoked on the slow path from basic_string::operator=(const basic_string&) if either of the strings is a long string..
`__string_assign_str_noalias_external` is optimized for being called from the operator= method: no alias into `this`, input has terminating zero as s[n], and size does not exceed max size. The branch in the external instantiated code should be well predicted.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D72987
Files:
libcxx/include/__string
libcxx/include/string
libcxx/src/string.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72987.238967.patch
Type: text/x-patch
Size: 4035 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20200118/29fbc66b/attachment.bin>
More information about the libcxx-commits
mailing list