This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Expand mempcpy into memcpy
- From: David Miller <davem at davemloft dot net>
- To: neleai at seznam dot cz
- Cc: libc-alpha at sourceware dot org
- Date: Wed, 06 Feb 2013 13:40:00 -0500 (EST)
- Subject: Re: [PATCH] Expand mempcpy into memcpy
- References: <20130206174021.GA21250@domone.kolej.mff.cuni.cz>
From: Ondřej Bílka <neleai@seznam.cz>
Date: Wed, 6 Feb 2013 18:40:21 +0100
> This makes all mempcpy call to call memcpy instead.
>
> There are two reasons, one is that it will simplify maintainance.
> Second is that posible performance gains are saving one addition and
> perhaps spilling one register. Problem is that implementation is quite
> big - 1105 bytes on x64. Probably cost of instruction/branch cache
> misses outweigth speedup we gained.
>
> I will move unused inline functions later.
The overhead of mempcpy vs. memcpy on sparc is exactly 2 instructions
and 1 extra cycle.
I think you are making an extremely cpu specific decision on how this
macro behaves.