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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1d321b3a6b8bcab2 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-01-24 06:11:11 PST Path: nntp.gmd.de!newsserver.jvnc.net!news.cac.psu.edu!news.pop.psu.edu!hudson.lm.com!newsfeed.pitt.edu!gatech!swrinde!news.uh.edu!uuneo.neosoft.com!Starbase.NeoSoft.COM!not-for-mail From: smize@Starbase.NeoSoft.COM (Samuel Mize) Newsgroups: comp.lang.ada Subject: Re: "Subtract C, add Ada" Date: 24 Jan 1995 08:11:11 -0600 Organization: NeoSoft Internet Services +1 713 684 5969 Message-ID: <3g31pv$4ts@Starbase.NeoSoft.COM> References: <3etund$hnr@miranda.gmrc.gecm.com> <3f5s92$3id@info.epfl.ch> <3fnf28$s3f@Starbase.NeoSoft.COM> <3frqpg$re5@cronkite.seas.gwu.edu> NNTP-Posting-Host: starbase.neosoft.com Date: 1995-01-24T08:11:11-06:00 List-Id: In article <3frqpg$re5@cronkite.seas.gwu.edu>, David O'Brien wrote: ... >C was designed in the 70's. ... >So, I think that "compilers *couldn't* optimize code" may be an over >generalization. My apologies for a loose statement. I meant to address the observed beliefs of people who feel that they can write more-efficient code in C. Generally, they hand-write code-level optimizations; they can see it, so they believe in it. They don't expect the compiler to optimize much. Some of them don't *want* the compiler to optimize; they're using side effects and "slick tricks" to save three instructions per hundred. Of course, a good optimizer would do far better for them, but they can't see that unless they meter their program, optimize it, and meter it again. Why bother with what when they *know* that it's more efficient code... Of course, the source code doesn't run. The object code runs. ... >You are making a *major* assumption ... >Again, you really are thinking with ... Your entire post is right, except for attributing these beliefs to *me*. I was unclear. These are beliefs that C programmers have stated to me, as to why C is "more efficient" than Ada. Of course, if a programmer is manually optimizing, he/she must have assumptions about, and a model of, the machine on which the code will run. Sometimes, these will be wrong. Another argument for machine optimization, which Ada better supports. >-- David O'Brien (dobrien@sea.gwu.edu) Yours in agreement, Sam Mize - smize@starbase.neosoft.com