K6 optimization && compiler builtins

Jeffrey A Law law@cygnus.com
Mon Dec 15 15:07:00 GMT 1997

  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.


More information about the Gcc mailing list