Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!snorkelwacker!spdcc!esegue!compilers-sender From: ok@goanna.cs.rmit.OZ.AU (Richard A. O'Keefe) Newsgroups: comp.compilers Subject: Re: Intermediate Representation Keywords: optimize, C, Fortran Message-ID: <3582@goanna.cs.rmit.oz.au> Date: 20 Aug 90 02:00:02 GMT References: <1990Aug07.153407.8877@esegue.segue.boston.ma.us> <250@cadlab.sublink.ORG> Sender: compilers-sender@esegue.segue.boston.ma.us Reply-To: ok@goanna.cs.rmit.OZ.AU (Richard A. O'Keefe) Organization: Comp Sci, RMIT, Melbourne, Australia Lines: 25 Approved: compilers@esegue.segue.boston.ma.us In article <250@cadlab.sublink.ORG>, staff@cadlab.sublink.org (Alex Martelli) writes: > marti@antares.inf.ethz.ch writes: > ...and don't forget Fortran... (see my msg of today in comp.lang.fortran- > f2c + Sun's cc produce code which runs almost twice as fast as Sun's > f77, for a strictly numerical code -2d complex fft- on a Sparcstation 1!). On reading this I immediately went and converted a small numerical code from Fortran to C and ran it on an Encore MultiMax (NS 32532 processors) running UMAX V 2.2M. The f77 and cc compilers on that machine do not appear to be ATT or Berkeley derived; the f77 compiler in particular is described as "an advanced, optimizing compiler". The code didn't exploit any of the micro-tasking or parallel features of Encore Fortran or Encore C, and no special declarations ('register' or the like) were used. Both used double precision. Result: the C code ran twice as fast (4 seconds / 8 seconds). The Fortran code used 2D arrays. The C code used 1D with strength reduction (a standard optimising technique) done by hand, and indexing replaced by pointer increments (also a standard technique, and the NS32532 doesn't use auto-??crement addressing) by hand. f2c starts to sound interesting... So it wasn't just Sun. (I say "wasn't" because as the original poster pointed out, Sun have some new compilers.) -- Send compilers articles to compilers@esegue.segue.boston.ma.us {ima | spdcc | world}!esegue. Meta-mail to compilers-request@esegue.