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.7 required=5.0 tests=BAYES_00,INVALID_DATE, LOTS_OF_MONEY,REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Xref: utzoo comp.lang.ada:2903 comp.lang.c++:5522 Path: utzoo!yunexus!ists!jarvis.csri.toronto.edu!mailrus!uunet!cs.utexas.edu!swrinde!gem.mps.ohio-state.edu!rpi!brutus.cs.uiuc.edu!jarthur!uci-ics!gateway From: schmidt@zola.ics.uci.edu (Doug Schmidt) Newsgroups: comp.lang.ada,comp.lang.c++ Subject: Ada Promises Message-ID: <1989Nov15.151849.1090@paris.ics.uci.edu> Date: 15 Nov 89 23:18:49 GMT Article-I.D.: paris.1989Nov15.151849.1090 References: <14033@grebyn.com> <7053@hubcap.clemson.edu> Reply-To: schmidt@zola.ics.uci.edu (Doug Schmidt) Followup-To: comp.lang.ada Organization: University of California, Irvine - Dept of ICS In-reply-to: billwolf%hazel.cs.clemson.edu@hubcap.clemson.edu (William Thomas Wolfe, 2847 ) List-Id: In article <7053@hubcap.clemson.edu>, billwolf%hazel (William Thomas Wolfe, 2847 ) writes: > This has been a property of some early Ada *compilers*, but is > not a property of the Ada *language*. I basically agree with this in principle, though Ganapathi and Mendal's IEEE Computer article from February 1989 points out several areas where the Ada's semantics of reordering operations restricts code motion and strength reduction. I'd assume that this penalizes Ada on certain RISC processors since it limits the degree of instruction scheduling possible. > Fortunately, compiler > technology is now capable of delivering tight, efficient Ada > object code, better than that being produced by C compilers. Ironically, Ganapathi and Mendal conclude their article by stating that: Use of the following Ada capabilities may hinder optimizations currently implemented in most Ada compilers: * exceptions * generic units * private and limited private types in package definitions * naming and modularity of package definitions, and * tasking In other words, just about every major feature that differentiates Ada from Modula 2 or Pascal exacts a penalty on optimization. This is a realistic and understandable phenomenon (C/C++ certainly contain their share of features that disrupt optimization), but it also makes me wonder just exactly what you mean with your claim that Ada compilers produce better code than C compilers. To avoid misunderstanding, can you please cite *specific* examples (especially references to publically available literature) to support your claim? For example: 1. Precisely which Ada compilers produce better code than which C compilers? Not all compilers are created equal... 2. What are the benchmarks and where can they be obtained? If, in order to generate good code, Ada programmers must limit themselves to a `Pascal subset' of the language exactly what advantages have accrued? 3. What are the hardware/OS platforms and what are the relative costs between the Ada and C compilers/environments? After all, it is unfair to compare a $500,000 Rational Ada environment against a $120 copy of Turbo C on MS DOS ;-). Without independently verifiable, empirical evidence it is difficult to make an informed choice on this issue. In the words of R. P. Feynman: The fundamental principle of science, the definition almost, is this: the sole test of the validity of any idea is experiment. Additional proof would greatly increase my confidence that Ada is more than just another `promising' language (pun intended!). thanks, Doug -- Master Swordsman speak of humility; | schmidt@ics.uci.edu (ARPA) Philosophers speak of truth; | office: (714) 856-4034 Saints and wisemen speak of the Tao of no doubt; The moon, sun, and sea speaks for itself. -- Hiroshi Hamada