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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1d321b3a6b8bcab2 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-02-07 05:57:40 PST Path: swrinde!gatech!darwin.sura.net!news.cc.ucf.edu!rs9320 From: rs9320@pegasus.cc.ucf.edu (Robert C. Soong) Newsgroups: comp.lang.ada Subject: Re: "Subtract C, add Ada" Date: 7 Feb 1995 13:55:23 GMT Organization: University of Central Florida Message-ID: <3h7u4b$jrg@news.cc.ucf.edu> References: <3fgphd$sc3@rational.rational.com> <3fnj0l$lte@newsbf02.news.aol.com> NNTP-Posting-Host: pegasus.cc.ucf.edu X-Newsreader: TIN [version 1.2 PL0] Date: 1995-02-07T13:55:23+00:00 List-Id: RonaldS60 (ronalds60@aol.com) wrote: : Gary Frankel (gfrankel@rational.com) wrote : >As of late 1989, I was involved in a commerical Ada optimizing : >compiler... We published results on a wide variety of benchmarks : >(Hennessey,etc) that showed that the Ada compiler was producing : >better code than any commercially available C compiler at that time : >and far better than most C compilers. This was true for workstations : >and cross compilers. : > : >I cant vouch to the same degree for the current state of the art : >since I havent done the same studies recently, but I believe : >that you will find tha the optimizing Ada compilers can produce : >comparable or better code than C compilers. I have also noticed : >that a number of C++ compilers produce poorer code - probably due : >to the current level of maturity. : About two years ago a IEEE article (in one of the s/w engineering : journals) compared the percentages of dead code (I assume using some : reachability algorithm) between Fortran, C, and C++. The numbers : were suprising (to say the least) and indicated that while Fortran : had the least dead code (followed by C) C++ could have upto 60%-75% : dead code. The exact quantity being undecidable in a static analysis : due to virtual function calls. This research hasn't had any obvious : effect on the C++ crowd (or any of the OO people) that I have seen. : >Generally, an optimizing Ada compiler is actually at an advantage over : >C compilers due to Ada sources providing more useful type information : >and the aliasing problems of C. Ada compilers will tend to : >compile more slowly since they do considerably more checking than : >C compilers. : One of the problems with aliasing is covered in an article titled : 'The Undecidability of Aliasing' by G. Ramalingam in ACM Transactions : on Programming Languages and Systems, vol. 16 no. 5, September 1994. : >So, I think that anyone who does a careful study will simply not : >find that C has any advantages in code efficiency over Ada at all : >(at least on any program more than a few short lines). : Actually there was an article around 1989 to 1991 covering the : difference between two programs (that did the same thing) written in : C and Ada. They were both compiled on the best compilers that could : be found. C won for overall speed, by less than 2% when runtime : checking was disabled (as it could be when the program was validated.) : A 1% to 2% difference in speed isn't much price to pay when the : overall development cycle is shortened (especially in testing) as : much as Ada allows (when compared to C.) Just think how nice it : would have been if that company in Redmond had used Ada instead of : C (oooh, software that actually works! and on time! ;{))). : >-- Gary Frankel : > : > : >Mitch Gart (mg@asp.camb.inmet.com) wrote: : >: Jay Martin (jmartin@oahu.cs.ucla.edu) wrote: : > : >: : I read the abstracts to these papers before I posted, there is not : >: : one peep about the relative efficiency between C and Ada which : >: : should be the central topic of discussion in my opinion. : > : >: I wrote a paper on this, which is now pretty dated, but still might : >: possibly be of interest: : > : >: "Benchmarking Ada, C, and Pascal", SigAda conference, July 1986, : >: Pittsburgh. : > : >: Mitch Gart : Ron : ====================================================== : Computers now make it possible to make more mistakes : more efficiently than ever before possible. : ======================================================