On Mon, 21 May 2007, Graeme Geldenhuys wrote:

> On 5/21/07, Lee Jenkins <[EMAIL PROTECTED]> wrote:
> >
> > Would anyone mind explaining this to me?  I don't get it.
> >
> > " Routines can now be marked with the inline directive.  This tells the
> > compiler that, instead of actually calling the routine, it should emit
> > code that includes the routine at the call site."
> 
> 
> As far as I understand it (FPC also has that feature) is that it is a
> hint to the compiler for optimisation purposes.

This is correct. Instead of inserting a call to the code of the routine, 
the generated assembler code for the routine is inserted at the location 
of the call. This is obviously only useful if the code of the routine
is small, and comparable to the overhead generated by the call 
(stack setup,call,stack cleanup).

Michael.

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to