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,4b12a5cee4778f63 X-Google-Attributes: gid103376,public From: Geoff Bull Subject: Re: GNAT & GCC performace (bad news) Date: 1999/12/03 Message-ID: <384751C0.FF51EE7F@acenet.com.au>#1/1 X-Deja-AN: 556081214 Content-Transfer-Encoding: 7bit References: <38473D90.68D8F47@acenet.com.au> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@telstra.net X-Trace: nsw.nnrp.telstra.net 944198116 203.35.118.1 (Fri, 03 Dec 1999 16:15:16 EST) Organization: Customer of Telstra Big Pond Direct MIME-Version: 1.0 NNTP-Posting-Date: Fri, 03 Dec 1999 16:15:16 EST Newsgroups: comp.lang.ada Date: 1999-12-03T00:00:00+00:00 List-Id: Upon further reflection, I think what you are trying to do is of doubtful validity. The becnchmark in question is designed to compare the performance of two machines, not two languages. Can you tell us what compilation options you used? Where can I get the source on the net? Geoff Bull wrote: > > Harald Schmidt wrote: > What I was expecting, > > because gnat isn't a compiler env. but a to-C(++) translator, > > the performance decrease about ten to twenty percent but > > not 50 percent. > > Gnat is a true compiler. It does not translate to-C(++). > > My experience is that, for equivalent code, Gnat produces code > that is as fast or slightly faster than C. This is not > surprising when one considers that Gnat and the Gnu C compiler > share the *same* backend code generator. > OTOH, my first Gnat program was about 100 times slower than the C > I had translated. Once I understood why (the C was buffering its IO, > the Ada was not) and made a few changes, the Ada version was a few > percentage points faster. > > I suggest you look at your benchmarks to make sure they > are really equivalent. > Also, did you compile both with the same levels of optimisation > and turn off Ada's run time checks (in my experience, the latter > doesn't usually make an enormous difference, but it is worth a try)? > > __ > Geoff