From: Gavin Sinclair Date: 2002-08-23T12:08:59+09:00 Subject: Re: What New Language After Ruby? Thanks very much to all who gave information on Fortran vs. C. It made very interesting reading. Gavin > On Fri, Aug 23, 2002 at 01:10:47AM +0900, Gavin Sinclair wrote: >> >> ----- Original Message ----- >> From: "Dan Sugalski" >> > >> > Fortran: Yeah, it's older than you are, but it still can't be beat >> for speed. >> >> Can I ask why? People say it all the time, but I point-blank refuse >> to believe that it is faster than optimised C. They're the same >> bloody thing, aren't they? - low-level procedural languages. My >> knowledge of Fortran is small, but of course everyone knows it's used >> for scientific calculations, so it may have the edge in numerical >> calculations (infinite precision, ...) but can't you get a C library >> that equals it? If not, why not. It's all machine language in the >> end, and not sufficiently far from that to begin with for me to >> believe that the two should be any different. > > When you start comparing language speeds, you really need to add some > context - which platform, compiler, etc. Fortran for science, math, or > engineering applications on supercomputer platforms as well as PC > platforms with the right compiler, is typically faster than C given the > same developer input time. > > As far as I've been able to gather, one of the factors in this is that C > exposes certain features to the developer that Fortran doesn't - e.g > pointers. This allowed the compiler writers to use a class of > optimizations which can be more globally applied to programs written in > Fortran. It also makes it easier to automatically parallelize (is that a > word?) than C. But that's just my conclusions as a non-compiler writer > in either Fortran or C. > > - alan > > -- > Alan Chen > Digikata LLC > http://digikata.com