guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Variables and the evaluator (Was: [PATCH] Implement local-eval, local-co


From: Andy Wingo
Subject: Variables and the evaluator (Was: [PATCH] Implement local-eval, local-compile, and the-environment)
Date: Sat, 14 Jan 2012 16:28:55 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)

Hi Mark,

On Sun 08 Jan 2012 21:39, Mark H Weaver <address@hidden> writes:

> Andy Wingo <address@hidden> 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/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]