Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/projects/SelfTest/ToStringVector.cpp
diff options
context:
space:
mode:
authorMartin Hořeňovský2017-01-15 09:41:33 +0100
committerMartin Hořeňovský2017-01-15 10:05:01 +0100
commit3b98a0166f7b7196eba2ad518174d1a77165166d (patch)
tree0f498144be6713cfc627d343103df7c6cafe8e08 /projects/SelfTest/ToStringVector.cpp
parent877fd523bcf5eef07970bebf603b2c3553877bf1 (diff)
downloadcatch3-3b98a0166f7b7196eba2ad518174d1a77165166d.tar.gz
Various small string usage performance improvements.
* Empty strings are now direct constructed as `std::string()`, not as empty string literals. * `startsWith` and `endsWith` no longer construct new a string. This should be an improvement for libstdc++ when using older standards, as it doesn't use SSO but COW and thus even short strings are expensive to first create. * Various places now use char literal instead of string literals containing single char. ** `startsWith` and `endsWith` now also have overload that takes single char. Generally the performance improvements under VS2015 are small, as going from short string to char is mostly meaningless because of SSO (Catch doesn't push string handling that hard) and previous commit removed most string handling if tests pass, which is the expect case.
Diffstat (limited to 'projects/SelfTest/ToStringVector.cpp')
0 files changed, 0 insertions, 0 deletions