This is the mail archive of the gcc-patches@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


Kaveh R. Ghazi wrote:-

> When glibc provides stpcpy, it seems like it's a big win to use it in
> lieu of a strlen/memcpy combo.  On x86-linux, this patch speeds up
> `concat' by 45%.
> 
> I'd like to get some testing on other systems.  On platforms whose
> libc doesn't provide stpcpy, this patch should have no effect.  If
> your libc does provide it, please apply the hunk to main, time it,
> then apply the other stuff and see what effect it has.  Adjust
> MAX_ITER so that it runs in about 20-30 seconds for a good test.
> (Careful, you may run out of memory, but I felt it important to
> isolate `concat' from `free'.)

Why not put a stpcpy equivalent in libiberty if it's useful?

Neil.


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