Hi Mark, On Sun 08 Jan 2012 21:39, Mark H Weaver <m...@netris.org> writes:
> Andy Wingo <wi...@pobox.com> writes: >>> We could change that, but I'm reluctant to make the evaluator any >>> slower than it already is. >> >> Using variable objects has the possibility to make the evaluator faster, >> actually, if at the same time we make closures capture only the set of >> free variables that they need, instead of the whole environment. That >> way free variable lookup would be something like (vector-ref >> free-variables k) instead of cdring down the whole environment chain. > > True, but wouldn't this require an analysis pass similar to > `analyze-lexicals'? Do we want to make our evaluator that complex? I think that yes, yes we do. It's sooooo slow now. Running a pre-analysis on the form is not that much more complex than the current "memoization" pass. Chez Scheme, in their evaluator, actually runs the equivalent of peval on its input. I don't think that's appropriate for us, for bootstraping purposes, but still, something has to be done to make free variable lookup faster. Andy -- http://wingolog.org/