This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 2/2] Improve 64bit memcpy/memmove for Corei7 with avx2 instruction
- From: OndÅej BÃlka <neleai at seznam dot cz>
- To: Nix <nix at esperi dot org dot uk>
- Cc: Ling Ma <ling dot ma dot program at gmail dot com>, libc-alpha at sourceware dot org, hongjiu dot lu at intel dot com
- Date: Fri, 7 Jun 2013 17:17:05 +0200
- Subject: Re: [PATCH 2/2] Improve 64bit memcpy/memmove for Corei7 with avx2 instruction
- References: <1370424188-4259-1-git-send-email-ling dot ml at alibaba-inc dot com> <20130605121816 dot GA11269 at domone dot kolej dot mff dot cuni dot cz> <CAOGi=dMiD=_Qf1EJ=F3hfyQDtQubDEC5pjpXKDCHrUQwhr=vzg at mail dot gmail dot com> <20130605161954 dot GA26401 at domone dot kolej dot mff dot cuni dot cz> <CAOGi=dPWPaX5prcL-uAaqS6=_ehzKeBmAFMdwV6aU34jZ0eHtQ at mail dot gmail dot com> <20130606125511 dot GA28565 at domone dot kolej dot mff dot cuni dot cz> <CAOGi=dPs9geCtrWhU1L_0DEfOWOknpzFSLmYs4gbYzGX8Zn5Hg at mail dot gmail dot com> <20130607104613 dot GA6343 at domone dot kolej dot mff dot cuni dot cz> <8761xqru5w dot fsf at spindle dot srvr dot nix>
On Fri, Jun 07, 2013 at 01:18:19PM +0100, Nix wrote:
> On 7 Jun 2013, OndÅej BÃlka said:
>
> > On Thu, Jun 06, 2013 at 08:11:15PM +0800, Ling Ma wrote:
> > I got some afterthoughts how improve memcpy/memset.
> >
> > First is to copy in backward direction.
>
> Don't we already do this in some situations? That's why there's a new
> symbol version of memcpy() et al on glibc 2.14+, because overlapping
> memcpy() no longer works and lots and lots of programs were relying on
> this (even though it was never ever guaranteed) and were breaking.
>
A version I wrote actually has check for overlap and can be aliased to
memmove.