This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]