From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c615e41a65104004 X-Google-Attributes: gid103376,public From: vsnyder@gyre.jpl.nasa.gov (Van Snyder) Subject: Performance Ada and C, was Re: Size code Ada and C Date: 1998/07/03 Message-ID: <6nh762$66i@netline.jpl.nasa.gov>#1/1 X-Deja-AN: 368270561 Content-Transfer-Encoding: 7bit References: <35921271.E51E36DF@aonix.fr> <3598358A.73FF35CC@pipeline.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Organization: Jet Propulsion Laboratory Newsgroups: comp.lang.ada Date: 1998-07-03T00:00:00+00:00 List-Id: In article , dewar@merv.cs.nyu.edu (Robert Dewar) writes: |> |> But to think there is a significant difference here between C, Ada or |> C++ is I think a delusion. |> Bolek Szymanski (http://www.cs.rpi.edu/szymansk) has noticed substantial performance differences between C and Fortran, and even more substantial differences between C++ and Fortran, at least in plasma particle-in-cell simulation codes. The reason that Fortran is usually faster than C is the reason that Ada ought to be faster: Pointers in Fortran are more disciplined -- no pointer arithmetic, and non-pointer thing-o's must have the TARGET attribute to get a pointer landing on them. Barbara Ryder, from AT&T Bell Labs (I don't know what fragment she's in now, if any) has shown that pointer optimization in C is NP-hard, while pointer optimization in Fortran and Ada is "only" polynomially hard. Only loosely relatedly, Les Hatton of PR-QA in Esher, Surrey, England has noticed that defect densities and lifetime costs of equivalent programs in Fortran, C and Ada are roughly the same, whereas defect densities and lifetime costs of C++ programs are roughly three times as large. One of my colleagues reminded me of a study, for which neither of us could remember the author, that observed that 3 out of 4 C++ projects that are initiated are cancelled before completion. -- What fraction of Americans believe | Van Snyder Wrestling is real and NASA is fake? | vsnyder@math.jpl.nasa.gov