Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!zaphod.mps.ohio-state.edu!swrinde!ucsd!ucbvax!bloom-beacon!eru!hagbard!sunic!mcsun!hp4nl!nikhefh!t19 From: t19@nikhefh.nikhef.nl (Geert J v Oldenborgh) Newsgroups: comp.lang.fortran Subject: why does optimization take so long ? Message-ID: <1236@nikhefh.nikhef.nl> Date: 20 May 91 19:58:03 GMT Sender: t19@nikhef.nl (Geert J v Oldenborgh) Organization: Nikhef-H, Amsterdam (the Netherlands). Lines: 15 I am curious whether any of you know why compiling certain routines with a -O flag takes a semi-infinite amount of time on certain computers (Apollo DN1000, Sun Fortran 1.3.1) (i.e. I killed compilation after a few hours CPU time for a single routine). The code in question is generated by a computer algebra program, and looks like this qqgg= n1i*n2i*pbqi*ptqi * ( - 2*pnpe*pbpt**2*qk + 2*pnpe* + qk*mb2*mt2 + 2*pnpb*pepb*pbpt*qk - 2*pnpb*pepb*qk*mt2 + 2* + pnpb*pept*pbpt*qk + 4*pnpb*pept*pbpt**2 - pnpb*pept*qk*mb2 - ...400 similar lines... As a lot of the time is spent here I'd like to be able to optimize it. Geert Jan van Oldenborgh gj@hep.physik.uni-muenchen.de