Most of the CPU time is actually used during the synchronization with multiple threads. I hacked together a version of MemoryLRUCache that used a ConcurrentHashMap from JDK 1.5, and it was another 50% faster ! At a minimum, if the ReadWriteLock class was modified to use the 1.5 facilities some significant additional performance gains should be realized.
Would you be able to run the same test in JDK 1.4 but use the util.concurrent compatibility pack? (supposedly the same classes in Java5) It would be nice to verify whether the gain is the result of the different ConcurrentHashMap vs the different JDK itself.
Paul Smith |
smime.p7s
Description: S/MIME cryptographic signature