unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Andreas Rottmann <a.rottmann@gmx.at>
Cc: guile-devel@gnu.org
Subject: Re: define-inlinable
Date: Thu, 07 Apr 2011 00:24:25 +0200	[thread overview]
Message-ID: <87pqoz2f3a.fsf@gnu.org> (raw)
In-Reply-To: <878vvngj9m.fsf@gmx.at> (Andreas Rottmann's message of "Wed, 06 Apr 2011 23:30:29 +0200")

Hi!

Andreas Rottmann <a.rottmann@gmx.at> 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’.



  reply	other threads:[~2011-04-06 22:24 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-22 23:20 Take some lowhanging fruit to speed up R6RS fixnum operations Andreas Rottmann
2011-03-22 23:20 ` [PATCH] " Andreas Rottmann
2011-03-24 21:51   ` Ludovic Courtès
2011-03-24 23:42     ` Andreas Rottmann
2011-03-25 12:16       ` Andreas Rottmann
2011-03-27 15:19         ` Ludovic Courtès
2011-03-27 22:20           ` Andreas Rottmann
2011-03-29 11:05 ` Andy Wingo
2011-03-30  1:37   ` Andreas Rottmann
2011-03-30 10:31   ` Andreas Rottmann
2011-03-30 10:58   ` Andreas Rottmann
2011-04-02 17:42     ` R6RS fixnum arithmetic optimizations Andreas Rottmann
2011-04-02 17:42       ` [PATCH 1/3] Add a few benchmarks for R6RS fixnum arithmetic Andreas Rottmann
2011-04-02 17:42       ` [PATCH 2/3] Several optimizations " Andreas Rottmann
2011-04-02 17:42       ` [PATCH 3/3] Add `fixnum?' VM primitive Andreas Rottmann
2011-04-04 21:53         ` Andy Wingo
2011-04-05  0:14           ` Andreas Rottmann
2011-04-06 12:42             ` define-inlinable Ludovic Courtès
2011-04-06 21:30               ` define-inlinable Andreas Rottmann
2011-04-06 22:24                 ` Ludovic Courtès [this message]
2011-04-11 16:56                   ` define-inlinable Andy Wingo
2011-04-11 20:01                     ` define-inlinable Ludovic Courtès
2011-04-11 21:05                       ` define-inlinable Andy Wingo
2011-04-11 22:11                         ` define-inlinable Andreas Rottmann
2011-04-07 15:57             ` [PATCH 3/3] Add `fixnum?' VM primitive Ludovic Courtès
2011-04-04 21:28     ` Take some lowhanging fruit to speed up R6RS fixnum operations Andy Wingo
2011-04-04 22:00       ` Andreas Rottmann
2011-04-04 22:12         ` Andy Wingo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pqoz2f3a.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=a.rottmann@gmx.at \
    --cc=guile-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).