From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Re: define-inlinable Date: Thu, 07 Apr 2011 00:24:25 +0200 Message-ID: <87pqoz2f3a.fsf@gnu.org> References: <87wrjglvsq.fsf@gmx.at> <1301766148-20242-1-git-send-email-a.rottmann@gmx.at> <1301766148-20242-4-git-send-email-a.rottmann@gmx.at> <87pqp1zh9s.fsf@gmx.at> <874o6btuuf.fsf_-_@gnu.org> <878vvngj9m.fsf@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1302128689 3984 80.91.229.12 (6 Apr 2011 22:24:49 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 6 Apr 2011 22:24:49 +0000 (UTC) Cc: guile-devel@gnu.org To: Andreas Rottmann Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Apr 07 00:24:43 2011 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Q7b9X-0007Nk-Kx for guile-devel@m.gmane.org; Thu, 07 Apr 2011 00:24:43 +0200 Original-Received: from localhost ([127.0.0.1]:56083 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q7b9V-0002Qx-0p for guile-devel@m.gmane.org; Wed, 06 Apr 2011 18:24:41 -0400 Original-Received: from [140.186.70.92] (port=33204 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q7b9O-0002Qh-Tn for guile-devel@gnu.org; Wed, 06 Apr 2011 18:24:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q7b9N-00013r-Ct for guile-devel@gnu.org; Wed, 06 Apr 2011 18:24:34 -0400 Original-Received: from solo.fdn.fr ([80.67.169.19]:41426) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q7b9N-00013X-83 for guile-devel@gnu.org; Wed, 06 Apr 2011 18:24:33 -0400 Original-Received: from nixey (reverse-83.fdn.fr [80.67.176.83]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) (Authenticated sender: lcourtes) by smtp.fdn.fr (Postfix) with ESMTPSA id EEBCC455A2; Thu, 7 Apr 2011 00:24:31 +0200 (CEST) X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 18 Germinal an 219 de la =?iso-8859-1?Q?R=E9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu In-Reply-To: <878vvngj9m.fsf@gmx.at> (Andreas Rottmann's message of "Wed, 06 Apr 2011 23:30:29 +0200") User-Agent: Gnus/5.110015 (No Gnus v0.15) Emacs/23.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 80.67.169.19 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:12177 Archived-At: Hi! Andreas Rottmann 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=E2=80=99s 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=E2=80=99.