forEach on HashMap and IdentityHashMap
martinrb at google.com
Tue Jun 11 17:11:34 UTC 2013
I'm not an expert on the new-fangled lambda lib stuff, but ... I totally
agree with your reasoning. These core classes should be as efficient as we
can make them.
On Tue, Jun 11, 2013 at 9:59 AM, Remi Forax <forax at univ-mlv.fr> wrote:
> Hi guys,
> This mail was originality sent to lambda-lib EG but Brian ask me to also
> send it here to not forget.
> We should provide an implementation of forEach for HashMap that avoid to
> create an Iterator,
> HashMap is too common to not have it's dedicated implementation
> (ArrayList by example has its own implementation of forEach).
> There is also another implementation that should have a specific
> implementation IdentityHashMap because
> entrySet() creates map entries on the fly so having a specific
> implementation that will not allocatin entries will improve performance
> (a lot for big identity hashmap).
More information about the core-libs-dev