4.0.0 JNI/reflection invocation 2/4/8 times as slow as in 3.3.3

Andrew John Hughes gnu_andrew@member.fsf.org
Sun Jan 23 01:08:00 GMT 2005

On Sat, 2005-01-22 at 23:06, Tom Tromey wrote:
> >>>>> "Jost" == Jost Boekemeier <jost2345@yahoo.de> 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
> resurrected.
> 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?
> Tom

Either I'm missing something or the two at the top are identical, if <<
has higher precedence than +.  << 1 is equivalent to multiplication by
Andrew :-)

Please avoid sending me Microsoft Office (e.g. Word, PowerPoint) attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html

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...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://gcc.gnu.org/pipermail/java/attachments/20050123/1e321229/attachment.sig>

More information about the Java mailing list