Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!mailrus!uflorida!haven!mimsy!chris From: chris@mimsy.umd.edu (Chris Torek) Newsgroups: comp.lang.c Subject: Re: NOT Educating FORTRAN programmers to use C Message-ID: <21730@mimsy.umd.edu> Date: 10 Jan 90 08:19:50 GMT References: <646@chem.ucsd.EDU> <14186@lambda.UUCP> Distribution: na Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 25 (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@lambda.UUCP> jlg@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@cs.umd.edu Path: uunet!mimsy!chris