Re: Book on low level program optimization
- From: Richard E Maine <nospam@xxxxxxxxxxxxx>
- Date: Mon, 30 May 2005 08:36:34 -0700
In article <1117440327.325798.169850@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
"David Flower" <DavJFlower@xxxxxxx> wrote:
> If this means what I think it means (i.e.replace all FUNCTION calls by
> inline code), then this feature has been in FORTRAN for at least forty
> years; it is known as statement functions.
No, statement functions are not necessarily inlined. That is not an
inherent property of statement functions. The standard mentions nothing
on the subject.
It happens that many implementations do inline statement functions, but
that is not inherent in their definition. It is just that their
definition means that they are inevitably simple enough to be good
candidates for inlining. Therefore, they often are inlined, but not
always.
Conversely, there exist implementations that can inline just about any
kind of procedure, although the benefits become pretty questionable for
large procedures. For many years there have existed compilers that could
(on request) inline small external procedures for example.
So although it is correct to say that statement functions are often, or
even typically, inlined, it is not correct to say that statement
functions are a feature for inlining.
The language doesn't actually need a feature for that. It is considered
an optimization that doesn't need a language feature.
--
Richard Maine | Good judgment comes from experience;
email: my first.last at org.domain | experience comes from bad judgment.
org: nasa, domain: gov | -- Mark Twain
.
- Follow-Ups:
- Re: Book on low level program optimization
- From: glen herrmannsfeldt
- Re: Book on low level program optimization
- References:
- Book on low level program optimization
- From: Niels L. Ellegaard
- Re: Book on low level program optimization
- From: David Flower
- Book on low level program optimization
- Prev by Date: Re: Book on low level program optimization
- Next by Date: compilation on different machines led to different executables
- Previous by thread: Re: Book on low level program optimization
- Next by thread: Re: Book on low level program optimization
- Index(es):
Relevant Pages
|
|