Path: utzoo!mnetor!uunet!husc6!bloom-beacon!gatech!purdue!i.cc.purdue.edu!j.cc.purdue.edu!pur-ee!uiucdcs!uxc.cso.uiuc.edu!uxe.cso.uiuc.edu!mcdonald From: mcdonald@uxe.cso.uiuc.edu Newsgroups: comp.lang.fortran Subject: Re: FORTRAN Horror (speed of FORTRA Message-ID: <50500044@uxe.cso.uiuc.edu> Date: 2 Apr 88 15:09:00 GMT References: <1508@vaxb.calgary.UUCP> Lines: 43 Nf-ID: #R:vaxb.calgary.UUCP:1508:uxe.cso.uiuc.edu:50500044:000:2427 Nf-From: uxe.cso.uiuc.edu!mcdonald Apr 2 09:09:00 1988 >However... I can well beleive that most FORTRAN programs ran slower >than they would have if written in Pascal. Most FORTRAN programs are >not dominated by numeric computations. The FORTRAN IO system was >abysmally slow, due to the need to interpret formats at run time, plus >general brain damage. I find it rather amusing how scientists and >engineers insist of using FORTRAN for "numeric" applications which are >90% IO, data conversion, and control, applications for which it is >wholely inappropriate, *especially* if you are not a professional >programmer. > Radford Neal I find this comment most curious. Disregarding Pascal for the moment, I've surveyed the Fortran programs around here (the University of Illinois Chemistry Department) twice in 15 years, and find that only a small amount of time is spent doing IO. Most, by far, is spent in either actual computation, or in a wait loop looking for user input. Only one group uses a substantial amount of IO (while diagonalizing 100000x100000 sparse matrices) and believe me, they make SURE that it is as efficient as possible! At the time of my first survey, 1975, I was the largest computer user; my main program output about 10 kbyte of data every 30 minutes of computing (on the Illiac IV). Today I do a lot of O, very little I, with most of the O going to graphics devices which are totally language-independent- everything in their drivers is in assembler. Actually the Fortran IO system is more efficient than most, as it allows direct block IO explicitly, if you use it right. In real scientific programs, no one uses formatted IO for intermediate results. I do agree that the default behaviour of the Fortran formatted IO system is unsatisfactory for interactive use --- that is its biggest problem and the reason that, for instance, C is becoming more popular. As to Pascal--- since I have never seen anyone write a scientific program in it, I can't comment directly, but looking at the standard Pascal definition, I can't see that it would be any better than Fortran: it lacks a LOT that Fortran has, so much, in fact, that it is really a toy. The only real alternative to Fortran is C, which has its own problems for scientific use: no Complex type, and problems with convenience handling multidimensional arrays; it's also harder to write a really good optimizer for C, due to aliasing (see the discussions in comp.lang.c). Doug McDonald