summaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/25_algorithms
diff options
context:
space:
mode:
authorWill Hawkins <whh8b@obs.cr>2022-08-24 02:16:48 -0400
committerJonathan Wakely <jwakely@redhat.com>2022-08-24 15:22:44 +0100
commit0b7c9254998b3fb2c39f6b86b5b196f415530205 (patch)
tree3c5842373e17a003ff7159b0ba506af72f971152 /libstdc++-v3/testsuite/25_algorithms
parent02de9d26b1820e4af35ebdd271c3a788e3c99035 (diff)
downloadgcc-0b7c9254998b3fb2c39f6b86b5b196f415530205.tar.gz
libstdc++: Optimize operator+(string/char*, char*/string) equally
Until now operator+(char*, const string&) and operator+(const string&, char*) had different performance characteristics. The former required a single memory allocation and the latter required two. This patch makes the performance equal. libstdc++-v3/ChangeLog: * include/bits/basic_string.h (operator+(const string&, const char*)): Remove naive implementation. * include/bits/basic_string.tcc (operator+(const string&, const char*)): Add single-allocation implementation. Signed-off-by: Will Hawkins <whh8b@obs.cr>
Diffstat (limited to 'libstdc++-v3/testsuite/25_algorithms')
0 files changed, 0 insertions, 0 deletions