This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
Re: [Bug libc/17801] New: memcpy is slower on amd64 than on i686 with a Sandy Bridge CPU
- From: OndÅej BÃlka <neleai at seznam dot cz>
- To: bugs at linkmauve dot fr <sourceware-bugzilla at sourceware dot org>
- Cc: glibc-bugs at sourceware dot org
- Date: Tue, 6 Jan 2015 14:11:35 +0100
- Subject: Re: [Bug libc/17801] New: memcpy is slower on amd64 than on i686 with a Sandy Bridge CPU
- Authentication-results: sourceware.org; auth=none
- References: <bug-17801-131 at http dot sourceware dot org/bugzilla/>
On Mon, Jan 05, 2015 at 10:23:18PM +0000, bugs at linkmauve dot fr wrote:
> On amd64 memcpy is actually calling __memcpy_avx_unaligned, and on i686 itâs
> calling __memcpy_ssse3_rep, and with a Sandy Bridge CPU, AVX is slower than
> SSSE3, despite being newer.
>
> I tested by disabling the AVX implementation and got nearly the same speed on
> amd64 than with the i686 version of the same program.
>
> Other functions (like memmove or strncmp) may also be affected, but I havenât
> checked them.
>
> Other CPUs as well, Iâve heard that Ivy Bridge also has a slower AVX
> implementation, maybe some AMD ones too.
>
No, that is typo, that implementation was aimed for avx2 only, specially
haswell where its fast.