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: Sun, 11 Nov 2007 16:28:53 +0100 Message-ID: <87sl3c6bt6.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> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1194795029 8282 80.91.229.12 (11 Nov 2007 15:30:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 11 Nov 2007 15:30:29 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sun Nov 11 16:30:34 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 1IrEla-0001Go-1x for guile-devel@m.gmane.org; Sun, 11 Nov 2007 16:30:30 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IrElO-0007V5-6R for guile-devel@m.gmane.org; Sun, 11 Nov 2007 10:30:18 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IrElL-0007UY-8I for guile-devel@gnu.org; Sun, 11 Nov 2007 10:30:15 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IrElF-0007UI-Q6 for guile-devel@gnu.org; Sun, 11 Nov 2007 10:30:13 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IrElF-0007UF-HY for guile-devel@gnu.org; Sun, 11 Nov 2007 10:30:09 -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 1IrElF-0002My-5t for guile-devel@gnu.org; Sun, 11 Nov 2007 10:30:09 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1IrEku-0006XE-CN for guile-devel@gnu.org; Sun, 11 Nov 2007 15:29:48 +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 ; Sun, 11 Nov 2007 15:29:48 +0000 Original-Received: from ludo by adh419.fdn.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 11 Nov 2007 15:29:48 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 50 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:DBjHdQBtDUZ383OoOu+v/JfJkYU= 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:6891 Archived-At: Hi, Neil Jerram writes: > I think I understand the point here, and it seems to me that this is > an improvement for the developer, not for the end user; and IMO not a > significant one (because it's pretty trivial to write a smob mark > function). It also implies a performance cost, from scanning regions > of SMOB memory that Guile currently knows cannot contain heap > pointers. It really isn't that clear what performance impact libgc's pervasive scanning has. >> * Rewrite the interpreter in Scheme (or a subset thereof), with a >> tiny Scheme-to-C compiler. That could be done in such a way that we >> could re-use, e.g., the memoization and unmemoization code that >> already exists in the first step. > > Interesting. Do you think that that would be a lot faster than the C > code we have now? Note that whether it's implemented by hand in C or compiled to C doesn't make a significant difference. The main optimizations I have in mind are the following: * 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; * no C function call overhead for tail(-recursive) calls. I'm sure there's much to gain from these. Implementing it in Scheme would improve maintainability while keeping room for future improvements. > I'm pretty Unicode-ignorant, but I've read enough to think that this > area is important. Is the problem with the C API just that it has > "char" everywhere? Yes, mostly. That said, I'm not sure exactly how the C I/O API would need to be changed. Thanks, Ludovic. _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel