From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 18383 invoked from network); 24 Jun 1998 13:44:01 -0000 Received: from fhg.de (HELO mailgw2.fhg.de) (153.96.1.1) by mail2.redhat.com with SMTP; 24 Jun 1998 13:44:01 -0000 Received: by mailgw2.fhg.de (fhg.de); Wed, 24 Jun 1998 15:43:57 +0200 (MET DST) X-ENV: (mailgw2.fhg.de) scr@iis.fhg.de -> axp-list@redhat.com.VIA-SMTP X-BULK-CHECK-2-980624.15.42.24: root@iis.iis.fhg.de [153.96.172.2] Received: by mailgw2.fhg.de (fhg.de) with ESMTP; Wed, 24 Jun 1998 15:42:20 +0200 (MET DST) from iis.fhg.de Received: by iis.fhg.de with SMTP; Wed, 24 Jun 1998 15:42:15 +0200 (MET DST) from sunserv02.iis.fhg.de Received: from ew003 by sunserv02.iis.fhg.de (SMI-8.6/SMI-SVR4) id PAA03140; Wed, 24 Jun 1998 15:42:15 +0200 Sender: scr@iis.fhg.de Message-ID: <3591031A.2781E494@iis.fhg.de> Date: Wed, 24 Jun 1998 15:46:02 +0200 From: Stefan Schroepfer Organization: FHG-IIS X-Mailer: Mozilla 3.0 (X11; I; SunOS 4.1.3_U1 sun4m) MIME-Version: 1.0 To: axp-list@redhat.com CC: martin.kahlert@mchp.siemens.de, robert@physiol.med.tu-muenchen.de Subject: Re: Performance measurements References: <199806240851.KAA06049@keksy.mchp.siemens.de> <3590D5AE.167EB0E7@iis.fhg.de> <19980624124843.A15248@keksy.mchp.siemens.de> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Martin Kahlert wrote: > > I thought, these convolution stuff should run like a champ > on Alpha. But since even Digital's Compiler can't do much > here, i think it's not egcs/gcc's fault. > (Alex Rhomberg reported for a 500MHz Alpha: > "DEC C V5.2-036 on Digital UNIX V4.0 (Rev. 564) 168.97 MFLOPS") That's right. As this convolution consists of floating point arithmetics only (besides loading / stroring), it should be fast on the Alpha. > Perhaps there could be done some tuning for memory > access on Alphas? But: all arrays should fit in the cache - > don't they? I see only a single array in yout code, whose size is 2*1024*sizeof(double) = 16k. Note that the 21164 has a L1 data cache of 8k. MFLOPS numbers from your code stay the same with N=512 instead of 1024. > There should be higher MFlops possible on these machines. > Perhaps the factor two results from the fact, that there can't > be done much more improvement on Intel chips any more. > 100MFLOP are one mult/add every second cpu cycle on a 200MHz > machine. Improvement is possible, at least on Alphas. As a general rule try to avoid superfluous array accesses, use more local variables instead (which can more easily be mapped to registers by the compiler). I played around with your code and got a version which achives 324.00 MFLOPS now (compared to 187.86 MFLOPS with your code). Note that in my version memcpy () takes 22.5 percent of total computying time on my Alpha, so that your MFLOPS numbers are too low as run time is measured overall. I is now your part - to verify that my version gives right results - to let me know how my version performes on the PPro (especially gcc and egcs compiled) [Robert: could you please compile my code on your Alpha using egcs and report your results to me] Stefan Schroepfer scr@iis.fhg.de ----------------- #include #include #include #include #include #define N 1024 void trafo(double *a,const int n,double *wksp,double *const ops) { double c0 = 3.52262918857095333469e-02; double c1 = -8.54412738820266443041e-02; double c2 = -1.35011020010254584323e-01; double c3 = 4.59877502118491543470e-01; double c4 = 8.06891509311092547385e-01; double c5 = 3.32670552950082631938e-01; int i,j; double *wksph=wksp+n/2; double lfT1, lfT2; double lfA0, lfA1; if(n<6) return; for(i=j=0;i