From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,37ab7eb89916c06 X-Google-Attributes: gid111c93,public From: "H.W. Stockman" Subject: Re: Compaq is sitting on a goldmine now that Linux is taking of Date: 1998/11/26 Message-ID: <365E0F25.7B30@wizard.com>#1/1 X-Deja-AN: 416073938 Content-Transfer-Encoding: 7bit References: <73k5gf$imn$1@infosun2.rus.uni-stuttgart.de> <365DA16B.DDDF2688@theo1.physik.uni-stuttgart.de> <365DA799.94B20020@theo1.physik.uni-stuttgart.de> <365DB99E.4B33E70D@theo1.physik.uni-stuttgart.de> Content-Type: text/plain; charset=us-ascii X-Trace: wormhole.dimensional.com 912134290 208.211.54.61 (Thu, 26 Nov 1998 19:38:10 MDT) Organization: Lentil Sorbet, Inc. MIME-Version: 1.0 Reply-To: hwstock@wizard.com NNTP-Posting-Date: Thu, 26 Nov 1998 19:38:10 MDT Newsgroups: comp.os.linux.alpha Murx wrote: > > Murx wrote: > > > In doing so it reduced run-time to SIX SECONDS > > THIS MEANS THIS BEATS DEC BY A FACTOR OF *TEN* > > HOLY MOSES !???? > > Well, sorry for the boldface, enthusiasm caught me ;-) > It's still a bit short of Goto's gemm. > (6 secs would correspond to ~350 Mflops). > If i'd manage to tell KAP that we'd rather > allow for a latency of 4 instead of 2 this figure > might actually reach the performance of the DXML. > > Considering the original code was: > > subroutine matmul(a,b,c,n) > real a(n,n),b(n,n),c(n,n) > integer n > do i = 1,n > do j = 1,n > a(i,j) = 0 > do k = 1,n > a(i,j) = a(i,j) + b(i,k) * c(k,j) > continue > continue > continue > end > As I'm sure you are aware, you've started with the most common, but most inefficient, manner of multiplying two matrices -- a complete cache thrasher with poor data re-use. My experience with KAP long ago, gave me the impression that KAP it is trained to recognize inefficient algorithms, and replace them wholesale. Simply reordering the loops up above, or transposing one matrix first so columns are multiplied by columns (instead of mixed column-row), will probably give a factor 2 to 4 speed increase. Some compilers are smart enough to do that.