[plt-scheme] cost of closure?

From: YC (yinso.chen at gmail.com)
Date: Thu May 31 18:03:36 EDT 2007

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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20070531/cd1698df/attachment.html>

Posted on the users mailing list.