Faster HashMap implementation

Ismael Juma mlists at juma.me.uk
Fri Jul 24 11:14:00 UTC 2009


Hi Doug,

Doug Lea <dl at ...> writes:
> On further evaluating it (among other possible HashMap replacements),
> I'm not convinced that they are enough better to commit.

That's a shame. What about that idea of having a factory method that would take
a Class object and return an appropriate Map implementation based on that? I
think this would be used more than IdentityHashMap as users could be instructed
to use that factory method all the time (unless they had a good reason not to)
instead of having to exercise judgement (like they have to do with
IdentityHashMap). One could even add a detector to findBugs (like it has for
Integer.valueOf and similar).

Best,
Ismael




More information about the core-libs-dev mailing list