[libcxx-commits] [PATCH] D133916: [String]: Inline clear_and_shrink and make it constexpr
Nikolas Klauser via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Dec 6 02:02:30 PST 2022
philnik added a comment.
Do you have a reproducer that doesn't rely on calling internal functions?
================
Comment at: libcxx/include/string:1726
{
- __clear_and_shrink();
+ clear();
+ if(__is_long())
----------------
Please run the string benchmarks to make sure this change doesn't cause performance regressions.
================
Comment at: libcxx/test/std/strings/basic.string/string.cons/copy_assignment.pass.cpp:46
S("abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"));
- test(S("1234567890123456789012345678901234567890123456789012345678901234567890"
- "1234567890123456789012345678901234567890123456789012345678901234567890"),
+ test(S("1234567890123456789012345678901234567890123456789012345678901234567890"),
S("abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"));
----------------
Why did these tests change?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133916/new/
https://reviews.llvm.org/D133916
More information about the libcxx-commits
mailing list