4.0.0 JNI/reflection invocation 2/4/8 times as slow as in 3.3.3
Andrew John Hughes
Sun Jan 23 01:08:00 GMT 2005
On Sat, 2005-01-22 at 23:06, Tom Tromey wrote:
> >>>>> "Jost" == Jost Boekemeier <email@example.com> writes:
> Jost> - table = new Object[old.length << 1 + 2];
> Jost> + table = new Object[(old.length * 2) + 2];
> Jost> Imho the new implementation is nonsense.
> The new implementation is really just the original reimplementation
> Jost> This hash is not a "normal" hash table with a list but it is an array
> Jost> where additional entries are stored above the current entry. The
> Jost> implementation requires that empty slots appear between the
> Jost> keys/tombstones, otherwise the hash degenerates to a linear search.
> Jost> So old.length << 2 could be a good value, or, as the original author
> Jost> decided old.length << 3.
> I don't follow why that would be better. Could you elaborate on this?
Either I'm missing something or the two at the top are identical, if <<
has higher precedence than +. << 1 is equivalent to multiplication by
Please avoid sending me Microsoft Office (e.g. Word, PowerPoint) attachments.
No software patents in Europe -- http://nosoftwarepatents.com
"Value your freedom, or you will lose it, teaches history.
`Don't bother us with politics' respond those who don't want to learn."
-- Richard Stallman
"We've all been part of the biggest beta test the world has ever known --
-- Victor Wheatman, Gartner
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 189 bytes
Desc: This is a digitally signed message part
More information about the Java