[PATCH] libstdc++: Optimize operator+(string/char*, string/char*) equally
whh8b@obs.cr
whh8b@obs.cr
Mon Aug 22 18:15:08 GMT 2022
After consultation with Jonathan, we realized that there was a missed
optimization opportunity in the implementation of the various forms of
operator+ for string.
operator+(char *, string) required a single allocation but
operator+(string, char*) required two. This patch attempts to change that
asymmetry.
Again, I have been a longtime reader of the source code but this patch is one of
my first attempts at contributing. I have attempted to follow all the rules but
I am sure that I missed something. Please let me know if/how I can change the
patch to make it acceptable.
Thanks for all your hard work maintaing this vital piece of software!
Will
More information about the Libstdc++
mailing list