From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,8807149319d062a0,start X-Google-Attributes: gid111c93,public X-Google-Thread: 1094ba,8807149319d062a0,start X-Google-Attributes: gid1094ba,public From: Toon Moene Subject: Latest egcs snapshot boosts Fortran (g77) performance on Alpha's Date: 1997/11/01 Message-ID: <63f8qd$qbr$2@news.utrecht.NL.net>#1/1 X-Deja-AN: 286422130 Organization: Moene Computational Physics, Maartensdijk, The Netherlands Newsgroups: comp.os.linux.alpha,comp.lang.fortran Hi All, The performance of g77 generated binaries on Alpha's has been lacking, ever since we got it working on this architecture (g77-0.5.20). Two people independently pointed out to me what was wrong: David Mosberger-Tang and Claus Denk, an Alpha-alpha :-) tester of g77. It turned out that array index computations were carried out in plain INTEGER arithmetic, whereas the final address computation is done in the `mode' (gcc-speak for "type") of pointers, which is 64 bits on Alpha's. Therefore, conversion instructions were generated in the intermediate code which prohibited the normal optimisations on array index calculations. This was somewhere in late June. I promised to look into it and actually discussed the matter on the gcc backend mailing list. Unfortunately, this didn't lead to a solution. With the creation of the EGCS (experimental GNU compiling system) effort, a new opportunity to take this up appeared. And indeed, after a week of intermittent discussion on the EGCS mailing list, Richard Henderson came up with two patches (one to the g77 front end - the Fortran specific part of g77) and one to the (general) backend of the compiler. Furthermore, Jeff Law upgraded the `loop-optimising' part of the compiler to do an even better job. These improvements went into the latest snapshot of egcs (see http://www.cygnus.com/egcs) for everyone to try out. However, do realise that this is a snapshot, so don't use it for production work. To give you a flavor of the sort of improvement one gets, I just checked with the CFD benchmark by Patrick Queutey (http://perso.club-internet.fr/queutey/Linux/Bench/bench.html, the 21x21x21 case). Before the change, on Greg Lindahl's 500 Mh 21164 based machine, I got around 10 seconds on this benchmark, now I get: 3.73user 0.01system 0:07.79elapsed 48%CPU (0avgtext+0avgdata 0maxresident)k 3.57user 0.01system 0:08.07elapsed 44%CPU (0avgtext+0avgdata 0maxresident)k 3.77user 0.01system 0:08.55elapsed 44%CPU (0avgtext+0avgdata 0maxresident)k 3.64user 0.01system 0:07.26elapsed 50%CPU (0avgtext+0avgdata 0maxresident)k Hope this is of interest. PS: Special thanks to Greg Lindahl to offer me access to an Alpha for looking into this problem ! -- Toon Moene (mailto:toon@moene.indiv.nluug.nl) Saturnushof 14, 3738 XG Maartensdijk, The Netherlands Phone: +31 346 214290; Fax: +31 346 214286 g77 Support: mailto:fortran@gnu.org; NWP: http://www.knmi.nl/hirlam