This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: K6 optimization && compiler builtins
- To: Ronald dot Wahl at informatik dot tu-chemnitz dot de
- Subject: Re: K6 optimization && compiler builtins
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Mon, 15 Dec 1997 16:10:25 -0700
- Cc: egcs at cygnus dot com
- Reply-To: egcs at cygnus dot com
In message <Pine.LNX.3.96.971215232539.25052A-100000@goliath.csn.tu-chemnitz.
de>you write:
> Hi,
>
> At the moment I'm playing with the string/memory routines of libc which
> are written in assembler. On a K6 (somtimes PPro also, Pentium not testet)
> I can get a performance gain of 10-40% (!). Now my question: If I use one
> of the string/memory functions (e.g. memcmp) in my programs, which one
> will be uses - the compiler builtin or the one in the libc? If the builtin
> is used - is it possible to include my optimized versions (if ready)?
For the x86, the compiler builtin will be used for memcpy of a constant
number of bytes, I think the compiler builtin will always be used for memcmp.
This can/will differ for other cpus.
jeff