Hashtable's and the tale of runtime

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

We had a curious problem with SPECjvm98 _213_javac and cacao.  A newly
recompiled cacao ended with 10% preformance degradation.  After further
investigation we ended with VMSystem.identityHashCode() and it's return
value.

_213_javac make heavy use of Hashtable's and the objects stored in the
hashtable use VMSystem.identityHashCode() as their hash function.  Since
alignment is normally 8 or 16-bytes, the distribution of the objects
seems to be not optimal.  We ended with 40000 Object.equals() calls more
and a doubled runtime for Hashtable.get() (measured clock cycles), as
Object.equals() is used in Hashtable.get().

A shifting of the VMSystem.identityHashCode() pointer value helps
(sometimes), but shifting by 3 makes it even worse (what was my guess to
make it better).

Any thoughts?  Should we change Hashtable.hash()?  Or return a better
value for VMSystem.identityHashCode()?  But most runtimes only return
the memory pointer...

TWISTI


[Index of Archives]     [Linux Kernel]     [Linux Cryptography]     [Fedora]     [Fedora Directory]     [Red Hat Development]

  Powered by Linux