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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,f822ae7b0f7433c1 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news3.google.com!news1.google.com!news.germany.com!aioe.org!not-for-mail From: Cesar Rabak Newsgroups: comp.lang.ada Subject: Re: Translating an embedded C algorithm Date: Thu, 18 Jan 2007 21:27:37 -0200 Organization: Aioe.org NNTP Server Message-ID: References: <1168871816.263502.212100@11g2000cwr.googlegroups.com> <45ae0afb$0$22524$39db0f71@news.song.fi> <1169040688.133180.20300@s34g2000cwa.googlegroups.com> <1169129966.683025.63680@a75g2000cwd.googlegroups.com> NNTP-Posting-Host: zEJK12x7djBBvRARhduGQA.user.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org In-Reply-To: User-Agent: Thunderbird 1.5.0.8 (X11/20061109) Xref: g2news2.google.com comp.lang.ada:8290 Date: 2007-01-18T21:27:37-02:00 List-Id: Jean-Pierre Rosen escreveu: > Talulah a �crit : >>> There is a least one documented case of Ada producing smaller code than >>> hand-optimized assembler. >> >> I love these statistics. There's a Java vendor who reckons the byte >> code runs faster than C as well. You can prove anything if y0ou have >> choice over the tools that you use to produce the results. This "hand >> coded assembler" could mean anything - it could mean taking Ada >> compiled code and ADDING instructions to it! > This was not the case. > See http://www.acm.org/sigada/education/pages/lawlis.html for the full > story > >> Thinking logically, if the assembler coder was any good, he can always >> produce code of equal size to compiled code, and should always produce >> tighter code. > The reference above has a good explanation why this is not the case. > This paper is the one it should never shown for people are not already knowledgeable of Ada: 1) It is old; 2) It hides labour under reporting the effort to write the Ada version: in section 5. "This 700 lines of Ada development had taken three weeks of labor, approximately 150 hours." It took also (section 2.) "...experts with various backgrounds in widely diverse organizations--the chip manufacturer, an Ada vendor, an independent consultant, a government laboratory, and the Air Force's graduate school, the Air Force Institute of Technology.", plus I understand the authors of the paper itself. 3) It puts away costs that are not insignificant (US$1000 in 1996 dollars) *per system*; 4) A close reading of section 4. "The Proof Backfired" shows that for the Ada version arrive at the same performance of the assembly code, one engineer from the compiler vendor had to perform a series of non trivial experiments, write a hand crafted version of Ada code to unroll loops *after* analysis of the assembly code and binary. So, not Ada technology for itself, after of all. Again, I remember: the report is old, and for present state of art chips with multiple datapaths, positively its more likely than a hand made assembly code will not match a HLL compiler generated binary. So, I think that it is the case Talulah points out.