Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!rutgers!apple!usc!snorkelwacker.mit.edu!ai-lab!life!tmb From: tmb@bambleweenie57.ai.mit.edu (Thomas M. Breuel) Newsgroups: comp.lang.fortran Subject: Re: Missing the whole point (the Fortran vs. C debate) Message-ID: Date: 3 Dec 90 01:02:47 GMT References: <28548@usc> <7552@lanl.gov> Sender: news@ai.mit.edu Organization: MIT Artificial Intelligence Lab Lines: 45 In-reply-to: jlg@lanl.gov's message of 1 Dec 90 21:47:11 GMT In article <7552@lanl.gov> jlg@lanl.gov (Jim Giles) writes: But the economics of computing still values speed over programmer time for most of the interesting problem domains. This is the economics of computing for some people. If you pay for your Cray time and if your programs take days to run even on a Cray, then you may be concerned with speeding them up by a factor of 2 or 3. In our environment, we use workstations (and the Connection Machine). Computer time is essentially free. For many applications, it makes little difference to me whether my program finishes in 1 hour or 1 day, and if I have really serious number crunching to do, I can often split up the work among a number of workstations. I think many scientists are in similar situations. It does make a significant difference, however, how long it takes me to write the program in the first place, how long it takes me to debug it, and how confident I can be that it is correct. If I really care about efficiency, I can identify the short section of code that does the real work with a profiler and help the compiler in generating better code (using pragmas, etc.). In any case, I am in complete agreement that language designers should try to include features that promote more efficient coding and maintenance. But so far, no language is widely available which does so AND is as efficient as Fortran-like languages. The major opportunities for optimization that exist in FORTRAN and that are absent in many other programming languages are ones that result from assumptions about the lack of aliasing. These lead to significant speedups only on machines with some kind of parallelism. You can easily add this as a pragma to a language like Modula or Ada. In many languages, a compiler can also generate separate versions for the aliased and unaliased case and use runtime dispatching. From a purely technical point of view, opportunity for optimization is no reason to stick with FORTRAN, since the difference to other languages is slight. From a practical point of view, it is, of course, true that in most numerically oriented computing environments, FORTRAN compilers generate the best code. But if you are using workstations, the situation is often reversed. Brought to you by Super Global Mega Corp .com