Re: Book on low level program optimization



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
.



Relevant Pages

  • Re: Inline drops
    ... Duncan's feature was spectacular and had fantastic potential. ... Black Pyramid so much - I like to backhand the inline drops. ... captive ball, and it is not an easy shot, and Fath*m because they have locks ... I agree - my favorite playfield feature is drop targets, ...
    (rec.games.pinball)
  • Re: Inline Comments - Word 2007
    ... It is very unfortunate that MS has decided that what once was the standard ... using the hidden text feature available in the FONT properties. ... Jay, if you have any contacts, please pass the word back to MS that inline ... Define a character style, including some formatting (color, background, ...
    (microsoft.public.word.newusers)
  • Re: Inline Comments - Word 2007
    ... Do you know that you can set the width of the column for the balloons? ... are using the hidden text feature available in the FONT properties. ... inline comments need to have some options added back in apparently ... Define a character style, including some formatting (color, ...
    (microsoft.public.word.newusers)
  • Re: Disadvantage of using inline
    ... inline is not a portable feature of C. ... His point is that "inline" is a new feature in C99, ...
    (comp.lang.c)
  • Re: [PATCH] PPC/PPC64: Introduce CPU_HAS_FEATURE() macro
    ... > * Can't make it an inline and still use the preprocessor concatenation. ... macro trick as Pekka suggest since I did use grep on those things quite ... > feature itself when reading the code, ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)