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,11414a19b0e4a97a X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!y4g2000yqy.googlegroups.com!not-for-mail From: Gautier write-only Newsgroups: comp.lang.ada Subject: Re: Advice on selling Ada to a C shop Date: Tue, 22 Jun 2010 14:00:48 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <101bf8f3-b823-45ee-9afd-40cbafb4b7a9@t26g2000prt.googlegroups.com> NNTP-Posting-Host: 62.203.163.203 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1277240448 24677 127.0.0.1 (22 Jun 2010 21:00:48 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 22 Jun 2010 21:00:48 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: y4g2000yqy.googlegroups.com; posting-host=62.203.163.203; posting-account=gRqrnQkAAAAC_02ynnhqGk1VRQlve6ZG User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.9) Gecko/20100317 SeaMonkey/2.0.4,gzip(gfe) Xref: g2news2.google.com comp.lang.ada:12844 Date: 2010-06-22T14:00:48-07:00 List-Id: Something in the "small example" category but with big monetary figures. At work, I came across a benchmarking, based on a real production model, with two languages having "end if"s, and C with its '}'s (or no '}' sometimes). I've added one more language to the test, for the fun of it. But something seemed strange in the results, although all in double- precision, run on the same machine. From time to time, a result (in a list of tens of thousands), was different in the column for C. Didn't seem a big deal. But summing the $'s, it was a big deal: millions! I looked at the C code for long time, then with its author; tried to add parentheses, to make smaller expressions. Nothing helped. Finally, it was a '}' at the wrong place, and a misleading indentation... This in only ~15 lines (but important ones: a double loop where everything is summed). Funny, isn't it ? ______________________________________________________________ Gautier's Ada programming -- http://gautiersblog.blogspot.com/ NB: For a direct answer, e-mail address on the following web site: http://www.fechtenafz.ethz.ch/wm_email.htm