4.0.0 JNI/reflection invocation 2/4/8 times as slow as in 3.3.3
Jost Boekemeier
jost2345@yahoo.de
Sat Jan 22 15:06:00 GMT 2005
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
More information about the Java
mailing list