chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] [PATCH] Another exponential case: analyze-expressi


From: Felix
Subject: Re: [Chicken-hackers] [PATCH] Another exponential case: analyze-expression on LET expressions
Date: Tue, 31 Jan 2012 14:48:39 +0100 (CET)

From: Peter Bex <address@hidden>
Subject: Re: [Chicken-hackers] [PATCH] Another exponential case: 
analyze-expression on LET expressions
Date: Sun, 29 Jan 2012 16:36:34 +0100

> On Sat, Jan 28, 2012 at 01:21:12PM +0100, Felix wrote:
>> I think this change is not correct - "lambda" and "let" are not
>> equivalent at this stage of the compiler: "let" introduces local
>> variables and "lambda" creates a procedure.
> 
> Here's another patch which basically does the same thing, but without
> changing LET's semantics.  Instead of appending localenv to env at each
> node below the let it keeps around another variable which represents
> the "full environment", which carries everything in "env" and "localenv".
> 
> There's still potentially exponential behavior in the memq calls
> which check whether something's in the local environment, but avoiding
> the append calls not only saves time appending but of course also saves
> on time spent in the GC.  My measurements produced a near-exact copy of
> the comparison picture in my original mail.

Signed off and pushed.


cheers,
felix



reply via email to

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