NOT Educating FORTRAN programmers to use C

Chris Torek chris at mimsy.umd.edu
Wed Jan 10 19:19:50 AEST 1990


(Since I refuse to be baited by jlg, I will not respond to most of
this, but one point, at least, requires a followup.)

In article <14186 at lambda.UUCP> jlg at lambda.UUCP (Jim Giles) writes:
>C is inherently slower [than FORTRAN] because extensive pointer use
>inhibits optimizations.

Like all sweeping statements, this one (actually `these two') is
(are) false.

There is a large class of machines on which pointers are as efficient
as, or or more efficient than, arrays, and on which the optimisations
made possible by knowing that two FORTRAN arrays are not aliased---
this is the big one; arrays, passed to subroutines by address, are
often not known not to interfere with each other in C, so compilers are
hard-pressed to use hardware vector instructions---simply do not exist.

There is a large class of problems, too, which cannot make use of
vector instructions.  Only for those problems that can, on those machines
that can, is this a significant loss.

(This of course is what `noalias' was all about.)
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris at cs.umd.edu	Path:	uunet!mimsy!chris



More information about the Comp.lang.c mailing list