Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Aug 2000 15:20:32 +0200
From:      Wilko Bulte <wkb@freebie.demon.nl>
To:        Peter Jeremy <peter.jeremy@alcatel.com.au>
Cc:        alpha@freebsd.org
Subject:   Re: optimized mem* and str* functions
Message-ID:  <20000819152032.A1483@freebie.demon.nl>
In-Reply-To: <00Aug18.140950est.115233@border.alcanet.com.au>; from peter.jeremy@alcatel.com.au on Fri, Aug 18, 2000 at 02:09:42PM %2B1000
References:  <39999750.C80F3B0B@imimic.com> <00Aug18.140950est.115233@border.alcanet.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Aug 18, 2000 at 02:09:42PM +1000, Peter Jeremy wrote:
> [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.

The later alpha/AXP implementations have byte manipulation instructions
IIRC. Are they used when available? That would require 'knowing' which CPU
we are running on of course.

-- 
Wilko Bulte  	 					wilko@freebsd.org
							Arnhem, the Netherlands


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?20000819152032.A1483>