lazy thoughts

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Mon Jan 12 16:54:50 PST 2009


Nick Sabalausky wrote:
> "Andrei Alexandrescu" <SeeWebsiteForEmail at erdani.org> wrote in message 
> news:gkgdfl$2too$1 at digitalmars.com...
>> Bill Baxter wrote:
>>> But I'm just guessing there will be some penalty for doing everything
>>> lazily in the case where you know you want a full array.  More data is
>>> needed on that I think.
>>>
>>> But even assuming it's is a free lunch, I'd want a better way make an
>>> array than putting .eager on everything.  First off, that's not even
>>> remotely a verb (like .eval() or .exec()), nor is it a noun that
>>> clearly expresses the type it will become (ala array() or toArray()).
>> I believe (without having measured... which means that I am essentially 
>> lying) that we can safely assume the lunch will be free or low cost. The 
>> copying of the underlying range should be cheap except for the shortest 
>> ranges.
>>
> 
> Could it get in the way of parallelizing map? 

Dunno. According to SPJ, automatically parallelizing map was a failed 
experiment in Haskell. Explicit parallelizing a la pmap seems to be the 
way to go.

Andrei



More information about the Digitalmars-d mailing list