Hi, Kevin Ryde <[EMAIL PROTECTED]> 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