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,2cdc6c2ee911fe77 X-Google-Attributes: gid103376,public From: Gautier Subject: Re: Ada vs. C++ Date: 2000/02/11 Message-ID: <38A44487.B6F64F96@maths.unine.ch>#1/1 X-Deja-AN: 584596693 Content-Transfer-Encoding: 7bit References: <38A37C97.9E181025@interact.net.au> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Trace: 11 Feb 2000 17:17:43 +0100, mac13-32.unine.ch MIME-Version: 1.0 Newsgroups: comp.lang.ada Date: 2000-02-11T00:00:00+00:00 List-Id: > Has anyone done any measurements on the different speeds and > memory requirements of comparable applications written in C++ > and Ada95. I am learning both languages. For simple performance comparisons (fixed allocations) it would be interesting - and rather comparing with Fortran compilers, THE reference... For programs using many temporary objects Ada offers possibilities that C/C++/Fortran may not offer. I think to multi-precision integer calculations that can be done without any dynamic allocation (no 'new', 'free', nor memory fragmentation problems that arise quickly in that context), because of ability of returning and manipulating non-trivial objects (unconstrained arrays). Beware of not comparing a bad C++ compiler with a good Ada one (or reversely) and conclude something about the languages... You have to precise how differently the programs can be coded in both languages. If you program in Ada just like C you might overuse allocations. Reversely, if you program the same algos using Ada's nested procedures, local objects, subtyping etc. it could bring good surpises... -- Gautier _____\\________________\_______\ http://members.xoom.com/gdemont/