convert ia64 strcat() from assembly to C

David Mosberger davidm@napali.hpl.hp.com
Fri Apr 23 06:16:00 GMT 2004


>>>>> On Fri, 23 Apr 2004 08:10:39 +0200, Christoph Hellwig <hch@lst.de> said:

  Christoph> On Thu, Apr 22, 2004 at 10:50:59PM -0700, David Mosberger
  Christoph> wrote:
  >> The patch below simply converts the assembly file
  >> sysdeps/ia64/strcat.S to C.  There was no point in writing it in
  >> assembly since a compiler can trivially do just as well.

  >> "make check" passed with no new problems.

  >> Please apply (and be sure to remove sysdeps/ia64/strcat.S).

  Christoph> What speaks against the (more complicated) version in
  Christoph> sysdeps/generic/strcat.c?

Performance.  I haven't measured it, but strlen() and strcpy() are
both reasonably well optimized for ia64 and the combo will definitely
outperform the naive byte-by-byte loops coded in C (well, at least if
you use GCC).

	--david



More information about the Libc-alpha mailing list