From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,94b6222e337d2ab8 X-Google-Attributes: gid111c93,public From: conrad@hive.me.gu.edu.au (Conrad Sanderson) Subject: Re: Alpha's floating point performance Date: 1998/11/11 Message-ID: #1/1 X-Deja-AN: 410566820 References: <3643A2A1.DECD63A@cs.sunysb.edu> <7276pa$iu5$1@zeitung.ngc.com> <729g65$cub$1@nnrp1.dejanews.com> Organization: Griffith University, Brisbane, Australia Newsgroups: comp.os.linux.alpha bxfqoxog@my-dejanews.com wrote: >My question is: who is responsible (or may be responsible) for the >reported fact, that Pentium 300 outperformed Digital 533 in floating >point operations? Is it C compiler? Can I expect the same thing >with FORTRAN compiler? Or is it Linux/Alpha problem? Does anyone >has any experience? We did 2 tests. One running FD code (Numerical Simulation of EM radiation). Second test was neural network code. The C++ source code in each case was identical for both machines. The setup was: 1) Alpha 533 MHz / egcs 1.1 / Linux 2.1.123 / 256M of ram 2) Pentium II 266 MHz / egcs 1.1 / Linux 2.0.34 / 128M of ram Source was compiled with -O3 -funroll-all-loops -fexpensive-optmizations and -mieee for the Alpha. Test 1: The FD code would NOT run correctly without -mieee. We tried installing a null signal handler for floating point errors, but that didn't work. The source code uses very little functions from the math library, hence the fast math library made no difference here. The main loop is basically access to 3d arrays, multiplication and addition. Options for the Pentium II were the same, except -mieee was not used. The end result: code on the Alpha ran _slightly_ faster (less than 5%). Not very inspiring for a 533 Mhz machine. Biggest cause of slowdown here is the quality of the code generated by egcs 1.1 and the "-mieee" switch. Test 2: The neural network code relies heavily on the exp() function, hence the fast math library was used. The code ran correctly without "-mieee" on the Alpha. Penium II 266 Alpha 533 Timings: 19.83 sec 14.313 sec (28% faster) 19.83 sec 20.050 sec [no fast math library] Conclusion: unless you use functions from optimized BLAS libraries or code everything in assembler, under the egcs 1.1 / Linux combination, a Pentium II machine running at similar clock speeds will easily outrun an Alpha machine. The fast math library for the Alpha can be obtained from: http://people.frankfurt.netsurf.de/Joachim.Wesner/ -- Conrad Sanderson - Microelectronic Signal Processing Laboratory Griffith University, Queensland, Australia http://spl.me.gu.edu.au [ under construction ]