Date: Fri, 18 Aug 2000 14:09:42 +1000 From: Peter Jeremy <peter.jeremy@alcatel.com.au> To: alpha@FreeBSD.ORG Subject: Re: optimized mem* and str* functions Message-ID: <00Aug18.140950est.115233@border.alcanet.com.au> In-Reply-To: <39999750.C80F3B0B@imimic.com>; from alc@imimic.com on Tue, Aug 15, 2000 at 02:17:36PM -0500
next in thread | previous in thread | raw e-mail | index | archive | help
[Third try] On 2000-Aug-15 14:17:36 -0500, "Alan L. Cox" <alc@imimic.com> wrote: >Has anyone seen or worked on Alpha-optimized, BSD-licensed >versions of the mem* and str* functions? I did some work on generically optimising the kernel bcmp() last year. It came out of a thread on -hackers in February 1999 which started with a subject of "vm_page_zero_fill" and morphed into "bcmp() [was Re: vm_page_zero_fill]". I believe this code is about as good as you can get in C - on as AS4100, it is 2-3 times faster than the previous code when compiled with gcc-2.8.1 (using DEC CC gave another 2 times improvement). I posted a pointer to that discussion here on 1st March 1999. Doug Rabson committed the final version of that code to /sys/libkern/bcmp.c. It hasn't been committed to userland, but there's not reason why it couldn't be. The ideas behind my code came from my memory of one of the early technical papers on the Alpha/AXP, which described how to fetch a byte on an architecture without byte fetch instructions. At this point in time, I don't remember the actual paper. Further enhancements on the Alpha should be possible by adding a liberal sprinkling of FETCH instructions (in which case, the asm output from DEC CC would make a good start). Extending this code to the remaining mem* and str* functions is left as an exercise for the reader :-). Peter To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?00Aug18.140950est.115233>