Testing a speedup to libiberty/concat.c
Neil Booth
neil@daikokuya.co.uk
Tue Jul 22 19:13:00 GMT 2003
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.
More information about the Gcc
mailing list