Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Bibek Sahu <scorpio@dodds.net>
To: axp-list@redhat.com
Subject: Re: Binary search speed in Alpha
Date: Sat, 28 Nov 1998 13:12:57 -0600 (CST)	[thread overview]
Message-ID: <Pine.LNX.3.95.981128131205.604B-100000@norad.dodds.net> (raw)
In-Reply-To: <13918.42883.521767.555763@flow.geo.vu.nl>


Assembly Language Programmer's Guide:
http://www.partner.digital.com/www-swdev/pages/Home/TECH/documents/Digital_UNIX/V4.0/AA-PS31D-TET1_html/TOC.html

Enjoy.
- Bob

On Fri, 27 Nov 1998, Jaap Schellekens wrote:

> Matti Aarnio writes:
>  > > that has a better performance on an Alpha. I suspect the 
>  > > memory access pattern of the binary search I use does not
>  > > favour the Alpha architecture a lot. Some numbers (seconds):
>  > 
>  > 	How large is the table ?
>  
> About 300 rows,
>  ... 
>  > 
>  > 	Alpha's memory subsystem is very good at pulling in (and also
>  > 	writing) large amounts of *sequential* data, in fact so good,
>  > 	that you can get at least 10-20 sequential data entries in
>  > 	within the time you do a *single* random walk step.  (And you
>  > 	may get even more dramatic boosts with SDRAM based 21164 systems,
>  > 	I don't remember what the XL300 has in it.)
>  
> Plain fpram (128 bit wide)
>  
>  > 	So yes, surprisingly you could perhaps get best performance by
>  > 	doing simple linear search.  Of course the log(N) is better when
>  > 	the N is very large, but up to N=100 (?) that might not be the case.
>  
> Tried that but it performs quite a lot slower. I forgot to mention
> that I already keep the last position in the table as a starting
> point becuase the answer is usually close to the previous one.
>   
>  > 	the cache.  The amount of data does exceed the amount of
>  > 	L1 cache at the CPU ?  Then timely preloads will help.
> 
> I think that the 96kb should be enough..
>  
>  > 	That preload trick is not quite simple, nor I have my reference
>  > 	books with me now.   But essentially:
>  > 
>  > 		preload(srcaddr)
>  > 		for (...) {
>  > 			preload(srcaddr+preload_stride)
>  > 			scan_blob(srcaddr)
>  > 			srcaddr += preload_stride
>  > 		}
>  > 
>  > 	The scan processing must handle the amount of data given
>  > 	in preload_stride, which in turn must be some power-of-2
>  > 	given to the preload instruction, if I remember correctly.
>  
> Sounds interesting if there are any refereces to book or other info
> that describe how to do this please let me know.
> 
> Thanks a lot,
> 
> Jaap
> 
> -- 
> --------------------------------------------------------------
> Jaap Schellekens                E-mail:         schj@geo.vu.nl
> Hydro(geo)logy Dept.            Fax:            ++31 20 6462457
> Inst. of Earth Sc.              Voice:          ++31 20 4447287
> Vrije Universiteit
> De Boelelaan 1085               use finger schj@flow.geo.vu.nl
>                                 for extra information
> 1081 HV Amsterdam NL            See also:   http://flow.geo.vu.nl
> 
> -- 
> To unsubscribe: send e-mail to axp-list-request@redhat.com with
> 'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com
> 


  reply	other threads:[~1998-11-28 19:14 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-11-27 10:07 Binary search speed in Alpha Jaap Schellekens
1998-11-27  8:58 ` Matti Aarnio
1998-11-27 13:27   ` Jaap Schellekens
1998-11-28 19:12     ` Bibek Sahu [this message]
1998-11-28 19:36       ` Jaap Schellekens
1998-11-28 20:46         ` Dave Gilbert
1998-11-29 16:54           ` Jaap Schellekens
1999-05-26 13:05       ` ElectricFence/Alpha Jaap Schellekens
1999-05-26 14:03         ` ElectricFence/Alpha Uncle George
1999-05-26 14:52           ` ElectricFence/Alpha Jaap Schellekens
1999-05-26 14:06         ` ElectricFence/Alpha Alvin Starr
1999-05-26 14:24         ` ElectricFence/Alpha Maciej W. Rozycki
1999-05-26 14:45         ` ElectricFence/Alpha Giuliano Procida
1999-05-26 14:56         ` ElectricFence/Alpha Mark Probst
  -- strict thread matches above, loose matches on Subject: below --
1998-11-27 13:58 Binary search speed in Alpha Wessels, Hans
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox