Testing a speedup to libiberty/concat.c
DJ Delorie
dj@redhat.com
Tue Jul 22 19:17:00 GMT 2003
> 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.
More information about the Gcc
mailing list