From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,2d89657929ba7a6b X-Google-Attributes: gid111c93,public From: Toon Moene Subject: Re: Switching from LInux to DU for Fortran Date: 1998/12/20 Message-ID: <367D05E7.C9C526B9@moene.indiv.nluug.nl>#1/1 X-Deja-AN: 424201969 Content-Transfer-Encoding: 7bit References: <754rjf$qv4$1@news.kjist.ac.kr> <3678BD23.7A1@magicnet.net> <5AEB9746C45923FC.114D92FA1D227798.FED8CEFB0737469D@library-proxy.airnews.net> <367BD379.A9B61853@moene.indiv.nluug.nl> <3D4E0E02941E69B4.CC5A8317D1D65D21.99407DD22F5A5872@library-proxy.airnews.net> Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@koza.nl.net X-Trace: koza.nl.net 914163253 16135 195.109.255.217 (20 Dec 1998 14:14:13 GMT) Organization: Moene Computational Physics, Maartensdijk, The Netherlands Mime-Version: 1.0 NNTP-Posting-Date: 20 Dec 1998 14:14:13 GMT Newsgroups: comp.os.linux.alpha dontspam_esci@fastlane.net wrote: > Toon Moene wrote: [ ... Slowdown of a factor of 10-15 between Digital Fortran and g77 is rather extreme ... ] > The code in question has 2 sqrts and 4 other divides in a tight loop > w/ 7 multiplies and 7 adds. There are 5 operands per iteration. > It's not surprising that compilers have trouble w/ it. The amazing > part is how well DEC FORTRAN handles it. Ah, that explains most of it: SQRT. The Alpha doesn't have a SQRT instruction (until the 21264) so the compiler has to code a function call. Digital Fortran is known to optimise loops with SQRT's by unrolling them until they contain a multiple-of-4 number of SQRTs and then calling a special run-time library to compute the 4 SQRTs "at once". Furthermore, the standard SQRT in glibc is known to be rather slow - there have been recent efforts to recode the math routines that showed spectacular improvements in this area (Perhaps one of the authors can chime in ?). -- Toon Moene (toon@moene.indiv.nluug.nl) Saturnushof 14, 3738 XG Maartensdijk, The Netherlands Phone: +31 346 214290; Fax: +31 346 214286 g77 Support: fortran@gnu.org; egcs: egcs-bugs@cygnus.com