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, MSGID_RANDY 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: Robert Dewar Subject: Re: Ada95 Strengths/Weaknesses. Date: 1999/09/29 Message-ID: <7str6f$k1d$1@nnrp1.deja.com>#1/1 X-Deja-AN: 530783979 References: <37EED7B8.245C0054@yukyonline.co.yuky> <7smp30$9aa1@news.cis.okstate.edu> <7sp8m9$a6e$1@nnrp1.deja.com> <7spauv$a2g2@news.cis.okstate.edu> <37F0E771.7E394DE4@maths.unine.ch> <7sqq0h$8q61@news.cis.okstate.edu> X-Http-Proxy: 1.0 x26.deja.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Wed Sep 29 20:01:28 1999 GMT X-MyDeja-Info: XMYDJUIDrobert_dewar Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.04 [en] (OS/2; I) Date: 1999-09-29T00:00:00+00:00 List-Id: In article <7sqq0h$8q61@news.cis.okstate.edu>, dvdeug@x8b4e53cd. (David Starner) wrote: > He basically said that if the Ada compiler did not produce code > as small as the C++ compiler, then it was junk, and that GNAT > in particular would produce the same code ("identical object > code") as G++. I will repeat it, if you write identical corresponding source code in Ada and C++ you will get identical object code. But you need to know a LOT about both languages to write identical code. Almost always comparisons are flawed because of casual assumptions that things that are superficially similar are the same. For example, computing a sqrt in C++ is not the same as computing a sqrt in Ada, because in the latter case but not the former case there are rules about precision, handling of minus zeroes etc, which are just ignored in the former case. << I was merely calling him on that.>> But I am not sure you understood what I wrote, your posts so far indicate otherwise. For example, you apparently in your first attempt used different random number generators. That of course renders the comparison completely useless, since now you are simply measuring the size/performance of two random number generators, and that has nothing whatsoever to do with a language comparison. In fact the comparison you are attempting to do is extremely difficult and requires, as I note, a very extensive knowledge of the two languages. Now of course people writing casually without this knowledge will see varied results, and they may see one thing or they may see another, depending on somewhat arbitrary decisions they have made. If you like post just an excerpt from your program, e.g. one procedure written in Ada vs one function written in C++, and it may be illuminating. If the object code is not the same, then they clearly are not identical in the sense I am talking about above, so it may be instructive to explain WHY they are not identical Robert Dewar Sent via Deja.com http://www.deja.com/ Before you buy.