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,1d575f572a099528 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-12-10 07:18:53 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!netnews.com!xfer02.netnews.com!newsfeed1.cidera.com!Cidera!portc01.blue.aol.com!newsjunkie.ans.net!news.chips.ibm.com!newsfeed.btv.ibm.com!news.btv.ibm.com!not-for-mail From: pontius@btv.MBI.com.invalid (Dale Pontius) Newsgroups: comp.lang.ada Subject: Re: What is faster Ada or C? Date: 10 Dec 2001 15:18:50 GMT Organization: IBM Global Services North -- Burlington, Vermont, USA Message-ID: <9v2joq$ra2$1@news.btv.ibm.com> References: <3c08314d$0$158$9b622d9e@news.freenet.de> NNTP-Posting-Host: kimon.btv.ibm.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.btv.ibm.com 1007997530 27970 9.61.131.227 (10 Dec 2001 15:18:50 GMT) X-Complaints-To: news@btv.ibm.com NNTP-Posting-Date: 10 Dec 2001 15:18:50 GMT X-Newsreader: knews 1.0b.0 Xref: archiver1.google.com comp.lang.ada:17672 Date: 2001-12-10T15:18:50+00:00 List-Id: In article , aaro@iki.fi (Aaro Koskinen) writes: ... > (Also, I would imagine that with Ada's strong typing, the compiler can > do better optimizations than an average C compiler. However, I don't > have any evidence for this...) I've always heard and felt this, too. However I wonder if theory and practice unfortunately differ here, due to the overwhelming popularity of C and its ilk. Take gnat as an example. It's a front-end for gcc, which is itself developed primarily in C. So granting that strong typing allows better optimization, is the back-end smart enough to use the extra information? The primary role for the gcc back-end is for C and C++ front-ends, and most likely C doesn't give extra type-enabled optimization information. Does C++ send such information to the back-end? In other words, I suspect only a custom/dedicated/tuned Ada compiler will (not can, but will) optimize better than a C compiler, simply due to marketplace forces. Dale Pontius NOT speaking for IBM