Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!mcgill-vision!bloom-beacon!bu.edu!bu-cs!snorkelwacker!apple!usc!chaph.usc.edu!usc.edu!raulmill From: raulmill@usc.edu (R D R) Newsgroups: comp.lang.misc Subject: Re: Common subexpression optimization Message-ID: Date: 7 Feb 90 17:43:38 GMT References: <4561@scolex.sco.COM> <14214@lambda.UUCP> <2217@sunset.MATH.UCLA.EDU> <4466@brazos.Rice.edu> <4616@brazos.Rice.edu> Sender: news@chaph.usc.edu Organization: University of Southern California, Los Angeles, CA Lines: 33 In-reply-to: preston@titan.rice.edu's message of 6 Feb 90 18:03:08 GMT Preston Briggs writes: ;> I'm still hoping to see somebody recode matrix multiply in C, using ;> all the source hacks they want, so we can compare it to what we get ;> using Fortran and our (not mine, friends') latest transformations. ;> . . . While we're on the topics of recoding, and how well source code maps onto a machine, why not consider a few other mainstream languages besides C and Fortran?????? I mean, C++ seems to rectify a large number of the problems one sees with C. (It allows inline functions, for example.) You still have pointers, but g++ (gnu's C++) allows one to declare that a function has no side effects, allowing the optimizer to fold calls to it. (gcc has both of these features too, and for "hello world" programs generates smaller code, but I'm getting tired of only hearing about c vs FORTRAN.) On the other hand, there are languages like APL which with a few changes (like variable scoping, and function rank declaration) ought to make very nice compiling languages. /* APL implementation of matrix multiply: A <- B +.x C */. From what I've heard, it is possible to DEVELOP code in APL about 6 or 7 times faster than what is usual with FORTRAN. (Weren't the two big advantages of FORTRAN over c supposed to be that FORTRAN is faster to write, and FORTRAN allows more optimizations in compilation, especially as machine architectures change???) -- Raul Rockwell INTERNET: raulmill@usc.edu ! UUCP: ...uunet!usc!raulmill ! 55 mph = 82 nc U.S.SNAIL: 721 E Windsor #4, GLENDALE CA 91205 !