From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@chbouib.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Re: Evolution & optimization of the module system Date: Mon, 09 Apr 2007 01:06:46 +0200 Message-ID: <873b3aqxdl.fsf@chbouib.org> References: <87sld4g6io.fsf@chbouib.org> <877iufhwj6.fsf@zip.com.au> <87irdyxzy3.fsf@laas.fr> <87wt2bxibp.fsf@zip.com.au> <87lkiq8s5k.fsf@laas.fr> <87bqjl25nk.fsf@zip.com.au> <87lkipovzz.fsf@laas.fr> <87649p3j29.fsf@zip.com.au> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1176074629 14372 80.91.229.12 (8 Apr 2007 23:23:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 8 Apr 2007 23:23:49 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Apr 09 01:23:04 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 1Hagis-0007VP-Bg for guile-devel@m.gmane.org; Mon, 09 Apr 2007 01:23:02 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hagmc-0005kI-Ql for guile-devel@m.gmane.org; Sun, 08 Apr 2007 19:26:54 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HagmX-0005iy-RX for guile-devel@gnu.org; Sun, 08 Apr 2007 19:26:49 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HagmW-0005i8-6I for guile-devel@gnu.org; Sun, 08 Apr 2007 19:26:49 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HagmV-0005hz-Va for guile-devel@gnu.org; Sun, 08 Apr 2007 19:26:48 -0400 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 1Hagik-0007Ai-Cb for guile-devel@gnu.org; Sun, 08 Apr 2007 19:22:54 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1HaggM-0005NV-ON for guile-devel@gnu.org; Mon, 09 Apr 2007 01:20:26 +0200 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, 09 Apr 2007 01:20:26 +0200 Original-Received: from ludo by adh419.fdn.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 09 Apr 2007 01:20:26 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 30 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: adh419.fdn.fr X-URL: http://www.laas.fr/~lcourtes/ X-Revolutionary-Date: 20 Germinal an 215 de la =?iso-8859-1?Q?R=E9volution?= 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.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) Cancel-Lock: sha1:YMHF3bgIOYDLdIc7FxAvEfT+9EE= X-detected-kernel: 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:6604 Archived-At: Hi, Kevin Ryde writes: > One possibility for duplicates would be lazy checking, only check for > a clash when actually using a symbol. That's sort of the prolog > theory: don't worry now about what might never come up. I suspect the > total work would end up greater though. Attached is a patch that implements lazy duplicate checking. Thus, `process-duplicates' is gone and `module-variable' plays its role when a variable is looked up for the first time. Subsequent lookups result in a "cache hit", i.e., the result is taken from the "import obarray" which is used as a cache. The code is simpler and obviously less memory-hungry than my previous attempts. The lazy approach is not very R6RS-friendly, though (see my earlier post on this topic). I measured around 20% speedups in "pure startup time". The measurements consist in running a dozen of times a program that just does a few `use-module's and/or `autoload's and measuring the total user execution time. Example scripts are available there: http://www.laas.fr/~lcourtes/software/guile/startup.scm http://www.laas.fr/~lcourtes/software/guile/startup-autoload.scm These measurements do not account for the overhead introduced in the variable lookup process, so measurements with actual programs were needed. _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel