This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Testing a speedup to libiberty/concat.c
> Why not put a stpcpy equivalent in libiberty if it's useful?
On systems where stpcpy isn't defined, the system's memcpy/strlen will
(hopefully) be faster than a portable C stpcpy.
We can also speed up concat itself by not using the out-lined
functions, and cache the string lengths, so in the copy loop we can
avoid calling strlen and just call memcpy. But I think that's only
worth it if it's a hot spot, since it reduces maintainability.