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.2 required=5.0 tests=BAYES_00,FREEMAIL_FROM, INVALID_MSGID,REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,64c375eca99d686e X-Google-Attributes: gid103376,public X-Google-Thread: 1094ba,1ec99b0df63ed9ca X-Google-Attributes: gid1094ba,public From: wclodius@aol.com (Wclodius) Subject: Re: Object-oriented Fortran vs. Ada 95? Date: 1996/02/19 Message-ID: <4gb2fg$677@newsbf02.news.aol.com>#1/1 X-Deja-AN: 140161876 sender: root@newsbf02.news.aol.com references: <4gajp4$6aj@fg70.rz.uni-karlsruhe.de> organization: America Online, Inc. (1-800-827-6364) reply-to: wclodius@aol.com (Wclodius) newsgroups: comp.lang.fortran,comp.lang.ada Date: 1996-02-19T00:00:00+00:00 List-Id: ig25@fg70.rz.uni-karlsruhe.de (Thomas Koenig) wrote: > > If you compare Fortran 95 with Ada 95, what obstacles to high > performance do you see in Ada? (And please, nobody say anything > about runtime checks this round, that's been beaten to death ;-) > The Ada experts will have their own, better informed, opinions, but as a Fortran user that has at least looked at the Ada 95 spec I thought that I should chip in my two cents. 1. If you don't use the object oriented features of the language there need not be any penalties for the presence of the object oriented features in the language. (Whether or not an Ada 95 compiler implements all the optimizations an Ada 83 compiler implements, is another story. I can, for instance, imagine that an initial rease of an Ada 95 compiler might not have all the optimiztions present in an 93 compiler.) There may be a small compile time penalty, and there will be a large increase in the difficulty in implementing robust optimizing standard conforming compilers. 2. It appears that, as with some other recent object oriented languages, Ada 95 has separated the inheritence and "subtyping" heirarchy. This should allow the use of inheritence for the incremental developement of software, without necessarilly incuring the dispatch penalty of inherited code associated with languages such as C++, which tie together the inheritence and subtyping heirarchies. However, I would prefer a different mechanism for this separation. (Indeed I would prefer a more flexible polymorphism than strict subtyping, e.g., the "matching" polymorphism of Kim Bruce's languages.) 3. There should be a penalty in cases where subtyping is used, due to the use of multiple dispatching requiring lookup tables. As a relative performance hit it might be greater than that of C++, because Ada does not normally have the performance hit from aliasing that C++ does have. 4. I have no opinion on the relative merit of Ada's generic modules vs. C++'s templates. William B. Clodius