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=0.6 required=5.0 tests=BAYES_40,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: "Marin D. Condic" Subject: Re: Ada vs. C++ Date: 2000/02/15 Message-ID: <38A9980E.A50A0D91@quadruscorp.com>#1/1 X-Deja-AN: 586218660 Content-Transfer-Encoding: 7bit References: <38A37C97.9E181025@interact.net.au> Organization: Quadrus Corporation X-Sender: "Marin D. Condic" (Unverified) X-Server-Date: 15 Feb 2000 18:17:56 GMT Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 2000-02-15T18:17:56+00:00 List-Id: G wrote: > > 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. > If your purpose is to select a compiler for a project with some sort of time critical requirement then I would suggest that you find some code/algorithms that are similar to the intended application (I/O intensive, Math intensive, Memory intensive, etc.) and feed them through a few compilers to see what you get. This sort of benchmarking can prove useful and there may be some of that work done by various realtime projects which folks might be willing to share. If your question is more along the lines of "Which language is faster and more memory efficient?" then I'm afraid you will get no useful information on that subject. For benchmarking purposes, you cannot separate the language from the implementation. One man's Ada compiler may produce dramatically better code than another man's C++ compiler. Likewise, the opposite. This really tells you nothing about either language - just how well/poorly someone implemented the language. This much can be said: There is nothing inherent in Ada that would make it less efficient than C++. In some ways, Ada syntax is superior for optimization purposes because more information is available to the compiler. In other ways, Ada could be slower because of the requirements for runtime checks. However, the language allows you to turn off runtime checks if efficiency is a major concern. (When doing realtime control systems, we routinely turned off checks and had code that was every bit as efficient as that which could be produced by any other language.) MDC -- ============================================================= Marin David Condic - Quadrus Corporation - 1.800.555.3393 1015-116 Atlantic Boulevard, Atlantic Beach, FL 32233 http://www.quadruscorp.com/ m c o n d i c @ q u a d r u s c o r p . c o m Visit my web site at: http://www.mcondic.com/ "Capitalism without failure is like religion without sin." -- Allan Meltzer, Economist =============================================================