From: Adam Beneschan <adam@irvine.com>
Subject: Re: Child vs nested package : efficiency matter
Date: Tue, 1 Jun 2010 08:38:54 -0700 (PDT)
Date: 2010-06-01T08:38:54-07:00 [thread overview]
Message-ID: <1b5a8557-d5bc-425e-b280-57ef97d27604@t34g2000prd.googlegroups.com> (raw)
In-Reply-To: op.vdmn7kl4ule2fv@garhos
On Jun 1, 8:34 am, Yannick Duchêne (Hibou57)
<yannick_duch...@yahoo.fr> wrote:
> Le Tue, 01 Jun 2010 17:03:44 +0200, Adam Beneschan <a...@irvine.com> a
> écrit:> 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 ?
I can't say. Different compilers will handle this differently. The
language standard says that Inline pragmas don't have to be obeyed---
they are just suggestions.
The only real way to tell what's going on is to disassemble the code.
-- Adam
next prev parent reply other threads:[~2010-06-01 15:38 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-29 12:56 Child vs nested package : efficiency matter Yannick Duchêne (Hibou57)
2010-05-30 1:17 ` BrianG
2010-06-01 15:03 ` Adam Beneschan
2010-06-01 15:34 ` Yannick Duchêne (Hibou57)
2010-06-01 15:38 ` Adam Beneschan [this message]
2010-06-01 19:04 ` Simon Wright
2010-06-01 19:11 ` Yannick Duchêne (Hibou57)
2010-06-02 11:11 ` -gnatN breakage was: " Alex R. Mosteo
2010-06-02 14:39 ` Vadim Godunko
2010-06-02 16:45 ` Georg Bauhaus
2010-06-02 16:50 ` Yannick Duchêne (Hibou57)
2010-06-02 20:35 ` Vadim Godunko
2010-06-01 18:35 ` Adam Beneschan
2010-06-01 19:09 ` Yannick Duchêne (Hibou57)
2010-06-01 19:44 ` Adam Beneschan
2010-06-01 19:56 ` Yannick Duchêne (Hibou57)
2010-06-02 1:38 ` BrianG
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox