public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] libstdc++: Optimize operator+(string/char*, string/char*) equally
@ 2022-08-22 18:15 whh8b
  2022-08-22 18:15 ` whh8b
  0 siblings, 1 reply; 13+ messages in thread
From: whh8b @ 2022-08-22 18:15 UTC (permalink / raw)
  To: libstdc++, gcc-patches

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



^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2022-08-25  5:52 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-22 18:15 [PATCH] libstdc++: Optimize operator+(string/char*, string/char*) equally whh8b
2022-08-22 18:15 ` whh8b
2022-08-23 16:33   ` Jonathan Wakely
2022-08-24  6:18     ` Will Hawkins
2022-08-24  9:49       ` Jonathan Wakely
2022-08-24  6:16   ` [PATCH v2] libstdc++: Optimize operator+(string/char*,string/char*) whh8b
2022-08-24  6:16     ` [PATCH] libstdc++: Optimize operator+(string/char*,string/char*) equally whh8b
2022-08-24  6:16       ` [PATCH] libstdc++: Optimize operator+(string/char*, string/char*) equally whh8b
2022-08-24 14:24       ` Jonathan Wakely
2022-08-24 22:39         ` Alexandre Oliva
2022-08-24 22:47           ` Jonathan Wakely
2022-08-24 23:02             ` Jonathan Wakely
2022-08-25  5:52               ` Will Hawkins

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).