Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!decwrl!mcnc!duke!sam.cs.olemiss.edu!tacky.cs.olemiss.edu!randy From: randy@tacky.cs.olemiss.edu (Randy Zagar) Newsgroups: comp.lang.fortran Subject: Dumb behaviour in Sun Fortran v1.3.1 Keywords: efficiency complex expressions Message-ID: <1991Feb16.011005.4289@cs.olemiss.edu> Date: 16 Feb 91 01:10:05 GMT Sender: news@cs.olemiss.edu Reply-To: randy@tacky.cs.olemiss.edu (Randy Zagar) Organization: University of Mississippi, Dept. of Computer Science Lines: 25 Sun's F77 v1.3.1 evaluates expressions involving complex numbers inefficiently. The offending expressions are of the type (complex expression) / (real expression) which are converted to (complex expression) / (complex expression) and then evaluated by complex division. The expression should be evaluated as (complex expression) * (1.0 / real expression) which only involves a real division and a real multiply. Please forgive me if I'm repeating well-known information, but I just achieved a 500% increase in application performance by forcing expressions to be evaluated as I just described. Randy Zagar (randy@sparc.ncpa.olemiss.edu) Nat'l Center for Physical Acoustics The University of Mississippi Colisium Drive University, MS 38677 (601)-232-5614