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: a07f3367d7,8147e9052e4bc0df X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,UTF8 Path: g2news2.google.com!news4.google.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!138.195.8.3.MISMATCH!news.ecp.fr!aioe.org!not-for-mail From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Re: Child vs nested package : efficiency matter Date: Tue, 01 Jun 2010 17:34:22 +0200 Organization: Ada At Home Message-ID: References: <37b699c4-da76-4b5f-9074-0aa465af4a19@v12g2000prb.googlegroups.com> NNTP-Posting-Host: 7g+UIcN0UM67WCCZrTfU2A.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 User-Agent: Opera Mail/10.53 (Win32) Xref: g2news2.google.com comp.lang.ada:12173 Date: 2010-06-01T17:34:22+02:00 List-Id: Le Tue, 01 Jun 2010 17:03:44 +0200, Adam Beneschan a = =C3=A9crit: > I can't say anything about any particular compiler. One possibility: > if procedure A calls procedure B, and A and B are in the same source, > a compiler may be able to put the code of B inline in procedure A's > code---i.e. the code for A will include B's code, rather than > including a "call" instruction. If it does this, then in the process,= > it may also to be able to eliminate instructions in B's code that have= > no effect on A. It's a lot harder to do this if A and B are in > different sources, which I'm assuming is happening if you are pulling > code out of a nested package and putting it in a child package. Adam, I've thought about it at that moment, so I've added some pragma = Inline for the relevant subprograms in the packages specs. This did not = = change anything. Do you think there are some reasons to believe pragma Inline is not = properly applied with inter-package subprograms invocations ? -- = There is even better than a pragma Assert: a SPARK --# check. --# check C and WhoKnowWhat and YouKnowWho; --# assert Ada; -- i.e. forget about previous premises which leads to conclusion -- and start with new conclusion as premise.