From: Anand, V. R <vai...@bo...> - 2004-06-23 15:52:19
|
Hello Douglas and Michael: I have tried running Douglas' spdtst.f on my machine (P4, 2.6 GHz, MinGW gcc 3.3.1, Cygwin gcc 3.3.1) with and without Michael's optimization flags, and the results are interesting. Incidentally, the=20 -mfancy-math-387-mfp-ret-in-387 flag doesn't work on my machine, so I left it out. Here are some=20 numbers: Mingw g77: 36.3 Cygwin g77: 22.7 Mingw g77 with Michael's flags: 23.3 Mingw g77 with -ffast-math only: 23.2 Cygwin g77 with -ffast-math: 16.95 It would seem that all of the performance gain from Michael's flags comes from -ffast-math alone. Further, if you apply the same flag to Cygwin g77, the same performance gain results. In short,=20 the performance gain seen seems to be the result of optimizing without strict adherence to IEEE floating point specifications. All of which is interesting, but leaves the original question of the=20 performance discrepancy between compiling with plain Mingw g77 and Cygwin g77 still unexplained.=20 As a side observation, the -ffast-math flag seems to make very little difference on Linux (I have=20 tried the example on two different Linux systems).=20 Regards, Anand -----Original Message----- From: Michael Gerdau [mailto:mg...@te...]=20 Sent: Wednesday, June 23, 2004 7:26 AM To: min...@li... Subject: Re: [Mingw-users] Poor executiion speeds using -mno-cygwin g77 option Hi Douglas ! Using your newly modified spdtst.f I've done some more checking. I also removed most of the write statement because I was simply interested in the raw computation. In particular I've tried to do some optimization. I have applied the following Flags: -malign-double -ffast-math -fno-bounds-check \ -mfancy-math-387-mfp-ret-in-387 -mno-soft-float The interesting part is that this doesn't seem to seriously improve the performance under Linux while it greatly speeds up things under W2K running under VMware. I have yet to boot into native WXP and repeat the tests and possibly play a bit with the above flags to see wether there are flags whose particular effect is making the difference. In other words: I'll be investigating wether the default configuration of g77 under Linux simply produces better optimized code which under W32 needs providing particular flags. Best, Michael --=20 Vote against SPAM - see http://www.politik-digital.de/spam/ Michael Gerdau email: mg...@te... GPG-keys available on request or at public keyserver |