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: Tucker Taft Subject: Re: GNAT & GCC performace (bad news) Date: 1999/12/02 Message-ID: <3846F523.6910E6D@averstar.com>#1/1 X-Deja-AN: 555962245 Content-Transfer-Encoding: 7bit Sender: news@inmet.camb.inmet.com (USENET news) X-Nntp-Posting-Host: houdini.burl.averstar.com References: X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: AverStar (formerly Intermetrics) Burlington, MA USA Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-12-02T00:00:00+00:00 List-Id: Harald Schmidt wrote: > > Hi everybody, > > 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. Try suppressing all run-time checks. Note also that Dhrystone for Ada and Dhrystone for C are necessarily not identical programs. Dhrystone is designed for comparing compilers for the same language, not for comparing compilers for different languages. It may be that the Ada version of Dhrystone is different in some performance-relevant way from the C version, or it is just the additional run-time checking that Ada is providing, that makes the difference. > ... 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. You will quickly be inundated with answers to this, but GNAT is *not* a translator to C++, it is a translator to machine code, just like gcc. It shares the same backend as gcc, but it does not use the GNU C or C++ front end. > > Harald -- -Tucker Taft stt@averstar.com http://www.averstar.com/~stt/ Technical Director, Distributed IT Solutions (www.averstar.com/tools) AverStar (formerly Intermetrics, Inc.) Burlington, MA USA