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,df854b5838c3e14 X-Google-Attributes: gid103376,public From: pitre@n5160d.nrl.navy.mil (Richard Pitre) Subject: Re: C/C++ knocks the crap out of Ada Date: 1996/03/29 Message-ID: <4jf9tt$b3d@ra.nrl.navy.mil>#1/1 X-Deja-AN: 144755220 references: <4j173h$lvo@oravannahka.Helsinki.FI> organization: Naval Research Laboratory newsgroups: comp.lang.ada Date: 1996-03-29T00:00:00+00:00 List-Id: In article <4j173h$lvo@oravannahka.Helsinki.FI> cjjohans@cc.Helsinki.FI (Carl J R Johansson) writes: > Richard Pitre (pitre@n5160d.nrl.navy.mil) wrote: > > : In software and language design there is a conflict between the need for > : machine efficiency and our limited ability to manage complexity. The > : differences between Ada and C++ can be fruitfully discussed in terms of the > : different compromises which were made in their designs in order to deal with > : this conflict. It is my understanding that the implementers of both languages > : struggled mightily with this issue. To my knowledge, there is no universal > : ideal compromise. > > So, is C really so much more efficient than other languages (I do not > question the efficiency of assembly, just C/C++) and is it not just a > myth? Does anyone have figures on this? I don't think a difference of a > few microseconds has any practical implications if that is what is > referred to. > > Of course measuring can be a bit difficult, both applications should > probably be done by one person equally fluent in both languages (and > unbiased) and on the same platform (without any inline assembly). > If possible s/he should probably be as experienced as possible. > > With efficiency I mean raw speed and not memory usage etc. > I don't know, but I would guess that it depends on the compiler implentation more than the language unless a language doesn't support critical features. While any programmer can implement anything the compiler won't necessarily be able to optimize it as well as a built in feature. Those kinds of features aside its my guess is that C++ and Ada compilers are roughly equivalent in the efficiency of the code that they generate. richard