From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 9328 invoked from network); 14 Aug 1998 12:24:39 -0000 Received: from iplink.net (192.139.81.2) by mail2.redhat.com with SMTP; 14 Aug 1998 12:24:39 -0000 Received: from iplink.net ([192.139.81.2]:30986 "HELO caesar.iplink.net" ident: "NO-IDENT-SERVICE") by caesar.iplink.net with SMTP id <31827-2281>; Thu, 13 Aug 1998 23:01:45 -0400 Date: Thu, 13 Aug 1998 23:01:45 -0400 (EDT) From: Alvin Starr To: "Cooperberg, David" cc: "'axp-list@redhat.com'" Subject: Re: RH5.1 axp floating point performance In-Reply-To: <199808140100.SAA02697@lamrc.lamrc.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Thu, 13 Aug 1998, Cooperberg, David wrote: > > I have noticed a considerable decline in floating-point performance in > upgrading from Redhat4.2 (for alpha) to Redhat 5.1 (same alpha). As an > example, the spec.c code below > executes in 27. seconds (time output) when run on my 433MHz RH5.1 alpha > when compiled as "gcc spec.c -o spec -lm" while it runs in 4.3 seconds > on > the same machine if I link to the old (from RH4.2) math library, > -lm-1.99, > (though the compile gives me warnings). I have tried a variety of > compiler > flags when linking with the new math library but have not improved > performance. I gather RH5.1 has a new glibc package and was wondering > if I > have to live with this huge performance hit. Is there a patch or flag I > am > missing? Has anyone else had problems? > > #include > > int main() > { > int i, j; > double ftemp; > > ftemp=1.; > for(i=1;i<10000;i++) { > for(j=1;j<1000;j++) { > ftemp+= 2.*sqrt(ftemp); > ftemp*=0.5; > } > } > printf("%g\n",ftemp); > } If I remember correctly this issue came up before and was explained as a problem with the sqrt function. The 4.2 was faster but had a bug that could cause some inaccuracy. Alvin Starr || voice: (416)585-9971 Interlink Connectivity || fax: (416)585-9974 alvin@iplink.net ||