From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Andy Wingo" Newsgroups: gmane.lisp.guile.devel Subject: Fwd: inlining enabled in guile-vm: things get faster Date: Mon, 26 May 2008 10:46:52 +0200 Message-ID: <7cc52ff20805260146ncfda841l226785d7afd23eeb@mail.gmail.com> References: <87abidxzw4.fsf@gnu.org> <7cc52ff20805260145o6ed917f4wafa617a5e656e0a3@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1211791644 10815 80.91.229.12 (26 May 2008 08:47:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 26 May 2008 08:47:24 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon May 26 10:47:55 2008 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.50) id 1K0YMu-0005iX-RG for guile-devel@m.gmane.org; Mon, 26 May 2008 10:47:49 +0200 Original-Received: from localhost ([127.0.0.1]:36316 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K0YM9-0002yE-QD for guile-devel@m.gmane.org; Mon, 26 May 2008 04:47:01 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K0YM3-0002wF-Pt for guile-devel@gnu.org; Mon, 26 May 2008 04:46:55 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K0YM2-0002ts-KS for guile-devel@gnu.org; Mon, 26 May 2008 04:46:55 -0400 Original-Received: from [199.232.76.173] (port=52179 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K0YM2-0002ta-7G for guile-devel@gnu.org; Mon, 26 May 2008 04:46:54 -0400 Original-Received: from wr-out-0506.google.com ([64.233.184.231]:29227) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K0YM1-0001sH-JE for guile-devel@gnu.org; Mon, 26 May 2008 04:46:53 -0400 Original-Received: by wr-out-0506.google.com with SMTP id 57so839846wri.12 for ; Mon, 26 May 2008 01:46:53 -0700 (PDT) Original-Received: by 10.141.27.16 with SMTP id e16mr548919rvj.136.1211791612280; Mon, 26 May 2008 01:46:52 -0700 (PDT) Original-Received: by 10.140.132.20 with HTTP; Mon, 26 May 2008 01:46:52 -0700 (PDT) In-Reply-To: <7cc52ff20805260145o6ed917f4wafa617a5e656e0a3@mail.gmail.com> Content-Disposition: inline X-Google-Sender-Auth: c60ec55352b153c9 X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) 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:7272 Archived-At: Forwarding to the list. I'm temporarily on gmail, on which I'm a newb, sorr= y :) ---------- Forwarded message ---------- From: Andy Wingo Date: Mon, May 26, 2008 at 10:45 AM Subject: Re: inlining enabled in guile-vm: things get faster To: Ludovic Court=E8s Hi! On Mon, May 26, 2008 at 9:55 AM, Ludovic Court=E8s wrote: > Andy Wingo writes: > > > So it turns out that inlining of a number of operations was disabled in > > guile-vm, from `apply' to `=3D' and other such things. > > That's nice, but it reminds me of that discussion we had when I > experimented with similar things in the evaluator [0]. I think it's > important to optimize the general R5RS-compatible case, rather than > start relying on non-standard behavior for speed. Oh I think you're right, definitely. But we have two things here: one, some of these operations are fundamental, like `apply'. Two, the functions that I inlined are all implemented in C, which is a form of the hack that you refer to; basically, these inlines make those C functions compile to code that doesn't have to leave the VM -- as if they were implemeted in Scheme at the beginning. Also, I would say that `+' is a valid instruction, wouldn't you? (Also, this machinery already existed in macros.scm, but it wasn't being plugged in.) So I think that we're on the same page :) Andy