This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]