Design for collections upgrades

John Nilsson john at milsson.nu
Mon Mar 14 09:07:25 PDT 2011


Isn't that what they call Deforestation[1]?

BR,
John

[1] http://en.wikipedia.org/wiki/Deforestation_(computer_science)

On Mon, Mar 14, 2011 at 4:59 PM, Rémi Forax <forax at univ-mlv.fr> wrote:
> On 03/14/2011 04:21 PM, Rémi Forax wrote:
>> On 03/14/2011 04:06 PM, Sam Pullara wrote:
>>> Ah, the intermediate Iterable. Too early :)
>>>
>>> Sent from my iPhone
>> Yes !
>> I've just thought that it's a good candidate for escape analysis :)
>>
>> Rémi
>>
>
> I've found a trick to be as fast the foreach version if
> there is only one filter, one mapper or a combination of
> one filter followed by one mapper.
>
> Basically, in the intermediary iterable, you can override
> reduce() and to() and write a version with a foreach :)
>
> Rémi
>
>
>


More information about the lambda-dev mailing list