This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Slow memcmp for aligned strings on Pentium 3


On Thu, 3 Apr 2003, Zack Weinberg wrote:

> Kevin Atkinson <kevin at atkinson dot dhs dot 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.
> 
The best I can give you is a memcmp implementation.  I know nothing about 
gcc internals.

-- 
http://kevin.atkinson.dhs.org


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]