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
- From: Neil Booth <neil at daikokuya dot co dot uk>
- To: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Cc: gcc-patches at gcc dot gnu dot org, gcc at gcc dot gnu dot org
- Date: Tue, 22 Jul 2003 20:04:39 +0100
- Subject: Re: Testing a speedup to libiberty/concat.c
- References: <200307221540.LAA16151@caip.rutgers.edu>
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.