Re: [spr29787] Closure ... will be stack allocated

Edi Weitz <[email protected]> Fri, 14 Jan 2005 19:43:48 +0100
Newsgroups gmane.lisp.allegro
Message-ID <[email protected]>
Hi Charley!

On Fri, 14 Jan 2005 07:22:29 -0800, "Charles A. Cox" <[email protected]> wrote:

>   It is an optimization note.  In general, closures are
> indefinite-extent objects and need to be allocated on the heap.
> However, if the compiler can determine, or if a user explicitly
> states, that a closure has dynamic-extent, then allocating the
> closure space on the stack has better run-time efficiency.

Thanks for the info, I suspected something like that but I wanted to
be sure.

>   I believe the reason the note is being displayed is for those
> programmers explicitly trying to achieve stack-consed closures.
> Without this message, it's not immediately obvious whether the
> compiler actually performed the desired optimization.

Hmm, I'm pretty sure I didn't explicitely ask for that in my code...

Thanks,
Edi.