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-Thread: 103376,25b9eb5c3a89bced X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!130.59.10.21.MISMATCH!kanaga.switch.ch!news-zh.switch.ch!switch.ch!cernne03.cern.ch!cern.ch!news From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Re: where exactly c++,c fail and Ada gets thru' Date: Tue, 02 May 2006 08:43:14 +0200 Organization: CERN - European Laboratory for Particle Physics Message-ID: References: <1145852356.559455.222600@i39g2000cwa.googlegroups.com> <1145855124.720029.35280@t31g2000cwb.googlegroups.com> <1235818.stAph9vF03@linux1.krischik.com> <1146207623.635562.289570@i39g2000cwa.googlegroups.com> <1201812.r16X2gYOJE@linux1.krischik.com> NNTP-Posting-Host: abpc10883.cern.ch Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sunnews.cern.ch 1146552193 1137 (None) 137.138.37.241 X-Complaints-To: news@sunnews.cern.ch User-Agent: Mozilla Thunderbird 1.0.8-1.4.1.SL (X11/20060424) X-Accept-Language: en-us, en In-Reply-To: <1201812.r16X2gYOJE@linux1.krischik.com> Xref: g2news2.google.com comp.lang.ada:4011 Date: 2006-05-02T08:43:14+02:00 List-Id: Martin Krischik wrote: > But it is the callers responsibility to check the input parameter before > calling the function. Of course - and it's where the code inlining can be useful. The biggest advantage of inlining is not in removing function call/return stuff, but in putting together things that otherwise could not be analysed together. We could now start endless debate on the cases where you can or cannot have code inlining, but the whole point in optimization is that there are many ways to do it (including global program optimization, things like JIT and so on) - and, as already said, it's where compiler vendors compete. It's easier to optimize languages that have richer type information (and again - nobody questions that), but at the end of the day it's only the sequence of *observable behaviours* that is of interest to the programmer and everything else is left at the mercy of the optimizer - in this light, range checking is one of those things that are relatively easy to optimize. -- Maciej Sobczak : http://www.msobczak.com/ Programming : http://www.msobczak.com/prog/