This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: 4.0.0 JNI/reflection invocation 2/4/8 times as slow as in 3.3.3
I think I have found the problem:
The new implementation of the IdentityHashMap causes this trouble:
- table = new Object[old.length << 1 + 2];
+ table = new Object[(old.length * 2) + 2];
Imho the new implementation is nonsense.
This hash is not a "normal" hash table with a list but it is an array
where additional entries are stored above the current entry. The
implementation requires that empty slots appear between the
keys/tombstones, otherwise the hash degenerates to a linear search.
So old.length << 2 could be a good value, or, as the original author
decided old.length << 3.
Jost