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,81da25fe30925578 X-Google-Attributes: gid103376,public From: Brian Rogoff Subject: Re: Numerics in Ada and C++ Date: 1998/01/23 Message-ID: #1/1 X-Deja-AN: 319046203 References: <1d34iv8.bgtlow7504qmN@pool-207-205-223-64.pitb.grid.net> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: 885597016 25827 bpr 206.184.139.132 Newsgroups: comp.lang.ada Date: 1998-01-23T00:00:00+00:00 List-Id: There is some discussion of this topic in the Ada FAQ, and I think one of DEC's compiler experts reports that well programmed Ada was just as fast as F77, given a decent compiler of course. Ada does not have the same aliasing problems that C and C++ have, and Ada 95, which is more permissive than Ada 83 in this regard, forces you to explicitly specify aliasing when you want it. Incidentally, I was looking for a better Fortran several years ago when I "discovered" Ada, after being disappointed by C++. I don't know what the current state of C++ compilers is wrt templates, but in 1995 it was abysmal. I don't think I'd switch now, even if all C++ compilers conformed to the draft ISO standard. Ada 95 is just a *much* better language IMO, despite numerous little (and big ;-) flaws. Particularly for numerics. -- Brian On Mon, 19 Jan 1998, Harry Erwin wrote: > The new standard for C++ introduces a number of numerics template > classes (valarray<>, slice<>, etc.) that are intended to implement smart > arrays built around simple classes that lack side-effects and aliasing > for the new and delete operators. This has been done so that optimizing > compilers can generate code for operations on those classes that > approaches FORTRAN-77 in efficiency. Experience in computational > applications of C++ has indicated that 'mid-level' C++ code (class code > involving branching and temporaries) has been particularly inefficient > and hard for compilers to optimize, and these features were added to > help solve the problem. My question here is whether Ada encounters the > same problems. > > -- > Harry Erwin, herwin@gmu.edu, http://osf1.gmu.edu/~herwin, Senior > Software Analyst for the FAA, PhD candidate modeling how bats > echolocate and lecturer for CS 211 (data structures and advanced C++). > >