commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karthik Kumar" <>
Subject Re: [primitives] objects indexed by int's and long's
Date Sat, 18 Feb 2006 16:33:31 GMT
Well, if the hashcode is already precalculated, we can use it to do lookups.
Isn't that how the searching already works?

IMHO, using polynomial function hashes is a better idea.

On 2/18/06, robert burrell donkin <>
> i've been thinking about performance for a client side application over
> the last week (or so). it seems to do a lot of operations whereby an
> object (of a list of objects) is looked up by a primary key. this is an
> int or a long but using a Map requires an indexing object (Int or Long).
> this is okay for Map's with small numbers of entries but creating all
> those indexing objects and calling all those hashCode's and equal's adds
> up to quite a big total problem.
> i wondered whether a primitive version of Map taking int/long as it's
> keys might be generally useful addition to primitives and also wondering
> about it's semantics.
> opinions?
> - robert
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message