[racket] Performance of delay/force vs lambda/apply

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Tue Jul 17 10:51:39 EDT 2012

On Jul 17, 2012, at 9:22 AM, Adolfo Pérez Álvarez wrote:

>> with `delay' or `lazy' and compare with the naive implementation.
>> 
> 
> I see now: the naïve versions aren't correct at all in the presence of
> errors. But if the delayed expression had no side effects (and we
> ignore multiple return values) both approaches would be equivalent, am
> I right?


Yes, but the "if"s should be spelled in HUGE font. 
We might be able to do better with a 'purity' analysis 
and with a typed version of lazy racket where you combine
purity analysis with type annotations. BUT this affects 
modular interfaces if you want to be precise enough and
we'd have to explore in practice how well this works. For that
we need people who want to (have) build(t) real things in lazy 
flavors of  Racket.


> Is this the main issue that keeps Lazy Racket in "experimental" state?
> Or are there other known limitations?

I don't think so but I will let Eli respond. 

-- Matthias




Posted on the users mailing list.