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: [r6rs-discuss] Implementors' intentions concerning R6RS Date: Mon, 12 Nov 2007 21:51:48 +0100 Message-ID: <874pfrjifv.fsf@chbouib.org> References: <818B5317-4F09-46F3-9376-43292CEB3C16@iro.umontreal.ca> <47229C5E.8070406@emf.net> <87640rm7ec.fsf@ossau.uklinux.net> <87hckbkpho.fsf@ossau.uklinux.net> <87d4uykkes.fsf@laas.fr> <87ejfd7fnq.fsf@ossau.uklinux.net> <877il57wyt.fsf@laas.fr> <2bc5f8210710300801o6de398aeg968bcb73bb0cc5e@mail.gmail.com> <87zlxzmnqp.fsf@laas.fr> <87d4un6nv0.fsf@ossau.uklinux.net> <87sl3c6bt6.fsf@chbouib.org> <87ir475ht3.fsf@ossau.uklinux.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1194900789 23758 80.91.229.12 (12 Nov 2007 20:53:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 12 Nov 2007 20:53:09 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Nov 12 21:53:14 2007 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 1IrgHC-0007Zm-Ps for guile-devel@m.gmane.org; Mon, 12 Nov 2007 21:52:59 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IrgH0-0001kg-Ip for guile-devel@m.gmane.org; Mon, 12 Nov 2007 15:52:46 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IrgGv-0001go-K2 for guile-devel@gnu.org; Mon, 12 Nov 2007 15:52:41 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IrgGu-0001e4-2Z for guile-devel@gnu.org; Mon, 12 Nov 2007 15:52:41 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IrgGt-0001dw-U5 for guile-devel@gnu.org; Mon, 12 Nov 2007 15:52:39 -0500 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IrgGt-0007tP-9g for guile-devel@gnu.org; Mon, 12 Nov 2007 15:52:39 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1IrgGl-0001NY-Mv for guile-devel@gnu.org; Mon, 12 Nov 2007 20:52:31 +0000 Original-Received: from adh419.fdn.fr ([80.67.176.9]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 12 Nov 2007 20:52:31 +0000 Original-Received: from ludo by adh419.fdn.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 12 Nov 2007 20:52:31 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 46 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: adh419.fdn.fr X-URL: http://www.laas.fr/~lcourtes/ X-PGP-Key-ID: 0xEB1F5364 X-PGP-Key: http://www.laas.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 821D 815D 902A 7EAB 5CEE D120 7FBA 3D4F EB1F 5364 X-OS: i486-pc-linux-gnu User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) Cancel-Lock: sha1:wmWJu83lwbOxGbDpO8o3W3Kt0UI= X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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:6893 Archived-At: Hi Neil, Neil Jerram writes: > These sound really interesting! Do we need to wait for a rewrite of > the core interpreter, though, or could we try doing this in the > current code? The current code is very tricky to work with. I once tried to change environments to use vectors instead of lists so that `scm_ilookup ()' would become O(N), but it proved hard to do and I eventually bailed out (IIRC the issue that stopped me had to do with rest arguments handling, currently handled by `SCM_CDRLOC', which assumes that a frame's variables are contained in a list, if you see what I mean). >> * heap-allocation-free closure invocations, which can be achieved by >> storing a closure's arguments into a stack-allocated C array or, >> even better, in registers (of course, invoking closures with rest >> arguments would still require allocating an argument list); >> >> * O(1) ILOC lookup, compared to the current O(N * M) algorithm, where >> N is the frame number and M the position of the variable within that >> frame's environment; > > Are you sure the current algorithm is O(N*M)? I would have said > O(N+M). Oh yes, you're right (these are two non-nested `for' loops). >> * no C function call overhead for tail(-recursive) calls. > > I thought that was mostly achieved already, by extensive use of > gotos. But I guess there must be important cases that I've not > noticed. You're right too. :-) Anyway, it looks like there are opportunity for performance improvements, and that could be an opportunity to switch to a compiled-to-C meta-circular interpreter (as seen in SICP). (It looks like I'm "dreaming" too much compared to my free time, but I hope others could adopt the idea!) Thanks, Ludovic. _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel