Slow memcmp for aligned strings on Pentium 3

Zack Weinberg zack@codesourcery.com
Fri Apr 4 08:52:00 GMT 2003


Kevin Atkinson <kevin@atkinson.dhs.org> writes:

> I was doing some tests with with memcmp and it seams that gcc 3.2.2 always
> uses cmps, even for aligned strings.
>
> I did some tests and discovered that using cmps was rather slow, compared 
> to a simple loop and then a bswap and subtract at the end.

Patches are welcome.

zw



More information about the Gcc mailing list