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: Markus Kuhn Subject: Re: Performance Ada and C Date: 1998/07/03 Message-ID: <359CB19D.EDAD6D1F@cl.cam.ac.uk>#1/1 X-Deja-AN: 368364975 Content-Transfer-Encoding: 7bit References: <35921271.E51E36DF@aonix.fr> <3598358A.73FF35CC@pipeline.com> <6nh762$66i@netline.jpl.nasa.gov> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Organization: University of Cambridge, Computer Laboratory Newsgroups: comp.lang.ada Date: 1998-07-03T00:00:00+00:00 List-Id: Van Snyder wrote: > 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. I wonder whether GNAT (using a backend that was originally designed specifically for C) can make much use of this theoretically better optimizeability of Ada. Do you know of any performance comparisons between GNAT and another Ada95 compilers that uses a code generator that was right from the beginning designed for Ada? I recently spent some time optimizing an Ada encryption routine , and while the best available C implementation did 27 Mbit/s, I wasn't able to get with Ada more than 20 Mbit/s on the same processor (Pentium II, 300 MHz) using the same compiler (gnat-3.10p). > 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. Do you know a study that using comparable methodology tries to determine such a number for both C++ and Ada95? Would be very interesting ... Markus -- Markus G. Kuhn, Security Group, Computer Lab, Cambridge University, UK email: mkuhn at acm.org, home page: