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. `process-duplicates' is gone and `module-variable' plays its role when an imported variable is looked up for the first time. Subsequent lookups for the same variable result in a "cache hit", i.e., the result is fetched directly from the "import obarray". The code is simpler and obviously less memory-hungry than my previous attempt. This 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 programs 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. The test suite, for instance, runs 30% faster. Other applications have more moderate improvements. It is worth noting that the calls to `literal_p ()' in `eval.c' incur non-negligible overhead since they usually fail, which means that they have the worst-case execution time for variable lookup. This is it. Comments? Thanks, Ludovic.