Hello! Andy Wingo <wi...@pobox.com> writes:
> On Sat 23 May 2009 11:52, Neil Jerram <n...@ossau.uklinux.net> writes: > >> Andy Wingo <wi...@pobox.com> writes: >> >>> With psyntax running a pre-analysis phase on all source code, we can do >>> away with lazy memoization entirely -- a neat hack, but it made eval.c >>> buggy and impenetrable. I'll write more about that in the future. >> >> Anticipating your "more in the future", do you mean that the >> pre-analysis does all the memoization in advance? > > It does not now, but it could. [...] > In compile mode, these procedures create tree-il objects. In eval mode, > they create s-expressions, so that the expander can work before modules > are booted. (The mode is the second parameter to sc-expand; it's eval > mode by default, but the compiler sets it to compile mode.) > > One should be able to memoize ilocs in from the result of the output, in > a second pass, given that there are so few forms. Of course some > memoization can happen lazily too, e.g. global lookup; [...] I'm slightly concerned that doing things ahead of time rather than just in time (i.e., lazily) would have a negative impact on the interpreter's start-up time, which may be noticeable for short-lived scripts. What do you think? Thanks, Ludo'.