From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,1177a02b35e507b5 X-Google-Attributes: gid111c93,public From: Murx Subject: Re: gcc/egcs C optimization Date: 1998/11/02 Message-ID: <363D9504.8C88BEF8@theo.physik.uni-stuttgart.de>#1/1 X-Deja-AN: 407517399 Content-Transfer-Encoding: 7bit References: Content-Type: text/plain; charset=us-ascii Organization: InterNetNews at News.BelWue.DE (Stuttgart, Germany) Mime-Version: 1.0 Newsgroups: comp.os.linux.alpha Conrad Sanderson wrote: > Berk Sensoy wrote: > > > Does anyone have any suggestions as to what would be the best > >compiler options to optimize (make the fastest at run-time) my code on an > >Alpha/Linux machine? I have a > >code that solves a biharmonic PDE by calling a Fortran subroutine. Our > >group just acquired an Alpha/Linux and we are trying to figure out how > >best to opimize its various capabilities vis-a-vis an Intel machine. > > -O3 -funroll-all-loops -fexpensive-optimizations > (may need to add -mieee depending on how the code is written) > > > Getting a decent math library will make the most difference: > > http://people.frankfurt.netsurf.de/Joachim.Wesner/ > My favourite is: g77 -O3 -funroll-loops -fno-schedule-insns -fschedule-insns2 -o foo.x foo.f -lffm -lfm -lm Our code yields a factor of three on a 533 Mhz linux alpha as compared to a 350 Pentium II, both egcs-1.1b. For a real fast code, you'll probably need to handoptimize the inner loops (cache-blocking, and loop-unrolling by four helps a *lot*) Christian