From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Tom Lord Newsgroups: gmane.lisp.guile.devel Subject: Re: goops and memoization Date: Tue, 3 Dec 2002 00:38:53 -0800 (PST) Sender: guile-devel-admin@gnu.org Message-ID: <200212030838.AAA19360@morrowfield.regexps.com> References: <02120219132603.12810@locke.free-expression.org> NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1038904307 26060 80.91.224.249 (3 Dec 2002 08:31:47 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 3 Dec 2002 08:31:47 +0000 (UTC) Cc: owinebar@free-expression.org, djurfeldt@nada.kth.se, dirk@sallust.ida.ing.tu-bs.de, neil@ossau.uklinux.net, guile-devel@gnu.org, djurfeldt@nada.kth.se Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18J8T2-0006mA-00 for ; Tue, 03 Dec 2002 09:31:45 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18J8RP-0004Xw-00; Tue, 03 Dec 2002 03:30:03 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18J8Qk-0004Pc-00 for guile-devel@gnu.org; Tue, 03 Dec 2002 03:29:22 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18J8QT-0004JN-00 for guile-devel@gnu.org; Tue, 03 Dec 2002 03:29:09 -0500 Original-Received: from 1cust3.tnt13.sfo8.da.uu.net ([63.10.241.3] helo=morrowfield.regexps.com) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18J8QR-0004Fb-00 for guile-devel@gnu.org; Tue, 03 Dec 2002 03:29:04 -0500 Original-Received: (from lord@localhost) by morrowfield.regexps.com (8.9.1/8.9.1) id AAA19360; Tue, 3 Dec 2002 00:38:53 -0800 (PST) (envelope-from lord@morrowfield.regexps.com) Original-To: djurfeldt@nada.kth.se In-reply-to: (message from Mikael Djurfeldt on Tue, 03 Dec 2002 08:59:48 +0100) Errors-To: guile-devel-admin@gnu.org X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Developers list for Guile, the GNU extensibility library List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.lisp.guile.devel:1778 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:1778 > But, as said earlier, being a efficiency freak, I'd like a > solution which works on the memoized code. In order to > maintain a reasonably clean separation of goops code and the > details of memoizing, it might then be a good idea to provide > some kind of code traverser which goops can plug into and > operate with minimal knowledge of memoized representation and > environment. Abstractly, you're computing something like: (M (O (U (M )))) where M is the memoizer, O the optimizer, and U the unmemoizer. Your ideal is to have O be a clean, perhaps even portable, source->source transform that knows nothing about memoization, yet for the whole composition to be fast. Have you considered the approach of writing a custom optimizer (not O, but another optimizer) that can do a good job of "compiling" (scheme to scheme): (lambda (ms) (M (O (U ms)))) ? If O is very clean/high-level, you can do all kinds of tricks by transforming it (e.g. automatic conversion to demand-driven execution). Writing O is just writing (with nothing extraneous) the transforms that describe the possible optimizations, and then tools that compile O and compositions of O with M and U can work out when to apply those transformations and short-cut the compositions. -t _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel