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: "James E. Hopper" Subject: Re: GNAT & GCC performace (bad news) Date: 1999/12/02 Message-ID: <021219992309319566%hopperj@macconnect.com>#1/1 X-Deja-AN: 556078366 Content-Transfer-Encoding: 8bit References: Organization: http://extra.newsguy.com Content-Type: text/plain; charset=ISO-8859-1 User-Agent: YA-NewsWatcher/4.2.3 Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-12-02T00:00:00+00:00 List-Id: Another thing that costs is exceptions. in all but the latest gnats (and only on certain platforms) ust having an exception handler carries a fair runtime penalty. I maintain the machten gnat and codebuilder comes with gnat 3.10 which is two generations back. (go to cs.nyu.edu/pub/gnat/powermac for latest version) also i did not implement zero cost exceptions (a feature of newer gnats on solaris and irix, and i belive other os's). peraps i will get around to it one of these days. also older versions of gnat paid sever penalty for some types of arrays. newer compilers have fixed most of that. so 1. turn off runtime checking 2. get newest version for nyu site 3. perhaps retry your benchparms on a platform with zero cost exceptions [either that or comment out the exception handlers] jim In article , Harald Schmidt wrote: > I am playing around with Ada95 since nearly two weeks > for an upcoming project, trying to select the best > language for a headless server application. I am using > CodeBuilder from Feldman's Ada book which comes with > gnat and gnu c. My experience while compiling and running > the dhrystone benchmark was that the C version of the > Dhrystone was nearly twice as fast as the Ada version, and > this sounds really bad. Has anyone any idea why this > is so and how to solve this problem. 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.