low level optimization

Doug Gwyn gwyn at smoke.brl.mil
Thu May 2 04:50:02 AEST 1991


In article <1991Apr29.213922.27863 at agate.berkeley.edu> rkowen at violet.berkeley.edu (Dario Bressanini) writes:
>Well, i tried on Mini systems (Gould, Convex ...). When i used 
>f77 (the standard unix compiler) the performances were *VERY* bad,
>but when i switched to the vendor's compiler the fortran code
>was faster than the C code.

Note that most UNIX "f77" and "cc" compilers use the exact same compiler
technology, including a common code generator.  For a fair comparison of
the properties of application implementation in different languages,
that is appropriate.  Certainly, switching to a more highly tuned
compiler would produce faster generated code, but that would be true for
C as well as for Fortran.  Another relevant factor may be that the UNIX
system implementors were not as concerned about obtaining optimal code
for Fortran, since the vast majority of UNIX is implemented in C;
therefore, even using the same technology the C compiler variant may
have been somewhat more highly tuned than the Fortran variant.

Anecdotal evidence comparing compiler performance is thus rather
useless in an argument about the run-time efficiency for programs coded
in different languages.  Note also that the very criterion is by no
means the most important one for selection of a programming language.



More information about the Comp.lang.c mailing list