Design for collections upgrades
forax at univ-mlv.fr
Mon Mar 14 08:59:18 PDT 2011
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 :)
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 :)
More information about the lambda-dev