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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,8fd45d32d7c94df3 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!k22g2000yqh.googlegroups.com!not-for-mail From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Re: User Defined Storage Pool : did you ever experiment with it ? Date: Tue, 8 Feb 2011 05:40:05 -0800 (PST) Organization: http://groups.google.com Message-ID: <88b1f41c-1260-432d-9c81-3b060e269d6f@k22g2000yqh.googlegroups.com> References: <0829d66f-2252-4709-83d9-b8a8f3e44158@y36g2000pra.googlegroups.com> NNTP-Posting-Host: 137.138.182.236 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1297172405 20294 127.0.0.1 (8 Feb 2011 13:40:05 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 8 Feb 2011 13:40:05 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: k22g2000yqh.googlegroups.com; posting-host=137.138.182.236; posting-account=bMuEOQoAAACUUr_ghL3RBIi5neBZ5w_S User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10,gzip(gfe) Xref: g2news1.google.com comp.lang.ada:16990 Date: 2011-02-08T05:40:05-08:00 List-Id: On Feb 8, 12:57=A0am, Shark8 wrote: > > [*] For the sake of comparison, the passive iterator idiom that is > > currently used with containers is not inline-friendly. > > Why do you say that? > I personally don't mind doing something like: > Declare > =A0 Procedure Iterate ( Position : In Cursor ) is > =A0 =A0begin > =A0 =A0 =A0--- Implementation. > =A0 =A0end iterate; > Begin > =A0 Container.Iterate( Iterate'Access ); > End; I don't mind to do that, either. > as the scope for Iterate is perfectly contained to where I want to > apply the procedure; Yes, but my point was not about how do I, as a programmer, perceive this additional procedure, but how the compiler copes with indirect calls via access value. It looks like this is too much for the compiler to do full inlining of the above, which can hit the performance considerably, especially when your local procedure itself is lightweight, which is frequently the case. -- Maciej Sobczak * http://www.inspirel.com