From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Neil Jerram Newsgroups: gmane.lisp.guile.devel Subject: Re: Inlining calls to primitives Date: Mon, 04 Sep 2006 23:02:23 +0100 Message-ID: <87pseb8f4g.fsf@ossau.uklinux.net> References: <87bqq4nczu.fsf@laas.fr> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1157407454 31303 80.91.229.2 (4 Sep 2006 22:04:14 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 4 Sep 2006 22:04:14 +0000 (UTC) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Sep 05 00:04:12 2006 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GKMXv-0005uv-7W for guile-devel@m.gmane.org; Tue, 05 Sep 2006 00:03:59 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GKMXu-0002Jj-R0 for guile-devel@m.gmane.org; Mon, 04 Sep 2006 18:03:58 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GKMXq-0002Hz-6P for guile-devel@gnu.org; Mon, 04 Sep 2006 18:03:54 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GKMXn-0002Hn-1P for guile-devel@gnu.org; Mon, 04 Sep 2006 18:03:52 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GKMXm-0002Hk-SK for guile-devel@gnu.org; Mon, 04 Sep 2006 18:03:50 -0400 Original-Received: from [80.84.72.33] (helo=mail3.uklinux.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GKMiO-0007J7-BE for guile-devel@gnu.org; Mon, 04 Sep 2006 18:14:48 -0400 Original-Received: from laruns (host86-129-125-104.range86-129.btcentralplus.com [86.129.125.104]) by mail3.uklinux.net (Postfix) with ESMTP id 9354640A45E for ; Mon, 4 Sep 2006 22:03:49 +0000 (UTC) Original-Received: from laruns (laruns [127.0.0.1]) by laruns (Postfix) with ESMTP id EA5CA6FF8E for ; Mon, 4 Sep 2006 23:02:23 +0100 (BST) Original-To: Guile-Devel In-Reply-To: <87bqq4nczu.fsf@laas.fr> ( =?iso-8859-1?q?Ludovic_Court=E8s's_message_of?= "Tue, 29 Aug 2006 10:48:53 +0200") User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) 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:6052 Archived-At: ludovic.courtes@laas.fr (Ludovic Court=E8s) writes: > Hi, > > I conducted an experiment with the evaluator consisting in implementing > "inlining" of calls to a few primitive procedures and I'd like to get > feedback about it. Interesting piece of work. It seems to me, though, that there are 3 things going on here. 1. Memoization of global variable references that yield one of a particular subset of common procedures. (I call this part memoization because it seems similar to the memoization that we already do for syntax like let, begin, and, etc.) 2. Inlining of the code for these procedures within CEVAL. 3. Changing IM_SYMs to be dynamic instead of fixed constants, plus the macrology and GCC jump table stuff. Do you know what the relative contributions of these 3 changes are? It would be nice if most of the benefit was coming from (1), because we could provide this in a very general way for all global variables, and without needing the code duplication that (2) brings. But I'd be surprised if (1) on its own could give us 20% performance improvement, because we already memoize from to , so the delta is just that from to , which is a pointer dereference. I'd also be surprised, however, if (2) was a significant contribution, because I didn't think a function call was a significant overhead these days. Regards, Neil _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel