[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: define-inlinable

From: Ludovic Courtès
Subject: Re: define-inlinable
Date: Thu, 07 Apr 2011 00:24:25 +0200
User-agent: Gnus/5.110015 (No Gnus v0.15) Emacs/23.3 (gnu/linux)


Andreas Rottmann <address@hidden> writes:


>>> +behaves the same as a regular procedure, but direct calls will result in
>>> +the procedure body being inlined into the caller.
>>> +
>>> +Making a procedure inlinable eliminates the overhead of the call,
>> How about:
>>   Procedures defined with @code{define-inlinable} are @emph{always}
>>   inlined, at all call sites.  This eliminates function call overhead at
>>   the expense of an increase in code size.
> Folded in, with the addition of using ".., at _direct_ call sites.".
> There's no inlining happening when you use `apply', or rebind the
> procedure with `let'.  Should this be made more explicit?

That’s fine IMO.

>>> but at
>>> +the same time means that the caller will not transparently use the new
>>> +definition if the inline procedure is redefined.
>>   ... redefined using @code{set!}.
> I don't agree with that one: there are multiple ways a procedure can get
> "redefined", `set!' being just one of them.  I was actually thinking
> more of re-evaluating the procedure definition or something like
> `geiser-compile-file', hence I left the text like it was, being more
> vague.

Right, good point.

> Updated patch attached, is it OK to push this way?

Yes, please go ahead!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]