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,539c04254abf1b37 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-03-01 08:43:27 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: andreatta@mail.chem.sc.edu (Dan Andreatta) Newsgroups: comp.lang.ada Subject: Re: compiler benchmark comparisons Date: 1 Mar 2002 08:43:26 -0800 Organization: http://groups.google.com/ Message-ID: <338040f8.0203010843.3c2207f1@posting.google.com> References: <3C74E519.3F5349C4@baesystems.com> <3C7D37FD.F67F7067@despammed.com> <17247c3d.0202271553.68aaf78d@posting.google.com> <338040f8.0202271819.373f733a@posting.google.com> <338040f8.0202281012.31593a2@posting.google.com> <5ee5b646.0202282107.6f3dd89a@posting.google.com> NNTP-Posting-Host: 129.252.151.109 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1015001007 15480 127.0.0.1 (1 Mar 2002 16:43:27 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 1 Mar 2002 16:43:27 GMT Xref: archiver1.google.com comp.lang.ada:20651 Date: 2002-03-01T16:43:27+00:00 List-Id: > First of all I think you mean gnu-c here (or you can just Yes. My apologies. > Second, if the gnu-c code runs 2-3 times as fast as the > C code it is simply NOT the same code. Yes and no. In this particular example the execution time is determined mainly by performance of the I/O library. And the GNU/Ada I/O library is slower than the GNU/C library. For fun I wrote some of the "shootout" programs in Ada and the result was that the execution times were comparable, except the ones that used heavily text I/O, where the Ada times were 2-3 times higher. I admit I am a newby, so my code was not so good, but, as I said, where the I/O wasn't the main part of the program, I wrote pretty fast code. > examples like this in detail, we discover that what > people think are "identical" programs are in fact totally Well, the core of the code was a repeated series of for loops: for i in 1..100 loop ada.text_io.put_line( Integer'Image(i) ) end loop; for Ada and for C: for (i=0; i<100 : ++i) printf("%d\n",i); What are the differences between the two? BTW, the test was ment to test the compiler speed, not the quality of the produced code. Maybe it wasn't clear in my previous posts. Dan