[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) |
Hi!
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!
Thanks,
Ludo’.
- R6RS fixnum arithmetic optimizations, Andreas Rottmann, 2011/04/02
- [PATCH 1/3] Add a few benchmarks for R6RS fixnum arithmetic, Andreas Rottmann, 2011/04/02
- [PATCH 2/3] Several optimizations for R6RS fixnum arithmetic, Andreas Rottmann, 2011/04/02
- [PATCH 3/3] Add `fixnum?' VM primitive, Andreas Rottmann, 2011/04/02
- Re: [PATCH 3/3] Add `fixnum?' VM primitive, Andy Wingo, 2011/04/04
- Re: [PATCH 3/3] Add `fixnum?' VM primitive, Andreas Rottmann, 2011/04/04
- define-inlinable, Ludovic Courtès, 2011/04/06
- Re: define-inlinable, Andreas Rottmann, 2011/04/06
- Re: define-inlinable,
Ludovic Courtès <=
- Re: define-inlinable, Andy Wingo, 2011/04/11
- Re: define-inlinable, Ludovic Courtès, 2011/04/11
- Re: define-inlinable, Andy Wingo, 2011/04/11
- Re: define-inlinable, Andreas Rottmann, 2011/04/11
- Re: [PATCH 3/3] Add `fixnum?' VM primitive, Ludovic Courtès, 2011/04/07