On Tue, 2005-07-12 at 11:02 +1200, Simon Kitching wrote:
> It would certainly be nice to know that collection methods will
> automatically work more efficiently when the objects being manipulated
> are String objects that have been interned (of course String.intern has
> to be used appropriately).

Umm..sorry, this particular argument doesn't work. The proposed
optimisation only improves the speed of comparing an object to itself -
not the most common operation in collection work. Operations that speed
up determining when two objects are NOT equal would help much more. [1]

I still think the original patch is relevant though (just not this
point).

[1] eg org.apache.commons.collections.map.IdentityMap, but this relies
on unique objects for keys rather than just trying to optimise for them.

Regards,

Simon




_______________________________________________
Classpath mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath

Reply via email to