[plt-scheme] cost of closure?
On 5/31/07, Carl Eastlund <cce at ccs.neu.edu> wrote:
>
> > In principle, a closure is essentially a struct. All that needs to be
> > stored is a code pointer and references to any free variables. How
> > efficient this is in practice depends a lot on the particular
> > implementation. Are you asking in general, or about PLT Scheme
> > specifically?
I am specifically interested in PLT Scheme (general info is also of interest
but secondary).
Does closure hold references to the stack? I've heard that Scheme doesn't
keep variables on the stack, but want to verify.
If closure is as efficient as a struct that's great - I am finding myself
leaning toward closure because it can be created anonymously and ad hoc, but
doing so with struct is a lot harder.
Thanks,
yinso
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20070531/cd1698df/attachment.html>