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,81cf52699486abe7 X-Google-Attributes: gid103376,public From: dvdeug@x8b4e53cd. (David Starner) Subject: Re: Ada95 Strengths/Weaknesses. Date: 1999/09/28 Message-ID: <7srb3r$8a21@news.cis.okstate.edu>#1/1 X-Deja-AN: 530506534 References: <37EED7B8.245C0054@yukyonline.co.yuky> <7smp30$9aa1@news.cis.okstate.edu> <7sp8m9$a6e$1@nnrp1.deja.com> <7spauv$a2g2@news.cis.okstate.edu> <7sr7a4$nc4$1@nnrp1.deja.com> Organization: Oklahoma State University User-Agent: slrn/0.9.5.7 (UNIX) Newsgroups: comp.lang.ada Date: 1999-09-28T00:00:00+00:00 List-Id: In article <7sr7a4$nc4$1@nnrp1.deja.com>, Robert Dewar wrote: >In article <7spauv$a2g2@news.cis.okstate.edu>, > dstarner98@aasaa.ofe.org wrote: >> Check. I just recently hand converted a small game from C++ to >Ada using >> G++ and GNAT respectively. The only changes besides that were >going from >> 0 based indexing to 1 based, and dropping some debug code in >the process. >> g++ *.cpp -o Alexis produces a binary with a size of 15,796 >bytes. gnatmake >> alexis-char produces a binary with a size of 735,962 bytes. > >Obviously an apples-vs-oranges comparison In some ways, yes, but it's a direct comparison of the most straightforward - the default - way of compiling. >produces a C++ binary >> of 12,568 bytes and an Ada binary of 51,124 bytes. > >Comparing the minimum sizes of trivial programs is not a >terribly interesting operation, since it has almost nothing >to do with real programs, One thing professionals seem to forget is that there are a whole lot more amateurs out there then there are professionals, and what the amateurs do is just as real as what the professionals do. Also, I may point that /bin holds 20 programs of this size (12K or less). They come very useful at times, and I wouldn't denigrate them as fake. >Of course you have to use identical libraries, >not just corresponding ones, because the libraries in C++ >and Ada definitely do not correspond. > >If you really want to waste more time tweaking, you might >want to try pragma No_Run_Time and eliminate the GNAT runtime. > >But almost certainly you are still comparing apples and oranges, >and the comparison is not particularly interesting. I don't know what you're comparing. I'm comparing the size of programs when I straightforwardly write it in language A and language B. >But almost certainly it is not comparable to the original. If >you like post the two pieces of code you compared. Quite often >such postings reveal huge misconceptions in what is and is not >comparable between the two languages. The programs are a little over 10K of source each. I don't feel that it would appropriate to post the whole thing to this newsgroup. ftp x8b4e53cd.dhcp.okstate.edu and get Alexis_Ada95.tgz & Alexis_C++.tar.gz if anyone really cares. >I don't think you need a new Ada compiler, I think you need more >understanding about how to do a comparison like this in a >meaningful manner. It was meaningful. Ringing the dinner bell and seeing how long it takes for the animals to show up may be awful if you want the theorical max speed of the animals (what you seem to be look for), but it's great if you want to see how long it take for the animals to show up when I ring the dinner bell (what I'm looking for.) David Starner - dstarner98@aasaa.ofe.org