From: ludo@chbouib.org (Ludovic Courtès)
To: guile-devel@gnu.org
Subject: Re: Evolution & optimization of the module system
Date: Mon, 09 Apr 2007 01:06:46 +0200 [thread overview]
Message-ID: <873b3aqxdl.fsf@chbouib.org> (raw)
In-Reply-To: 87649p3j29.fsf@zip.com.au
Hi,
Kevin Ryde <user42@zip.com.au> 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
next prev parent reply other threads:[~2007-04-08 23:06 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-17 15:15 Evolution & optimization of the module system Ludovic Courtès
2007-02-18 23:32 ` Kevin Ryde
2007-02-19 9:24 ` Ludovic Courtès
2007-02-21 22:21 ` Kevin Ryde
2007-02-22 9:20 ` Ludovic Courtès
2007-02-22 22:23 ` Kevin Ryde
2007-02-23 13:15 ` Ludovic Courtès
2007-02-25 23:37 ` Kevin Ryde
2007-02-26 21:15 ` Ludovic Courtès
2007-02-26 22:46 ` Kevin Ryde
2007-02-27 8:21 ` Ludovic Courtès
2007-04-08 23:06 ` Ludovic Courtès [this message]
2007-04-08 23:25 ` Ludovic Courtès
2007-04-08 23:24 ` Ludovic Courtès
2007-04-30 8:39 ` Ludovic Courtès
2007-05-05 20:48 ` Ludovic Courtès
2010-07-20 21:20 ` Andy Wingo
2010-07-20 22:24 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=873b3aqxdl.fsf@chbouib.org \
--to=ludo@chbouib.org \
--cc=guile-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).