An Alternative Hashing Alternative (original) (raw)

Rémi Forax forax at univ-mlv.fr
Wed Jun 6 20:31:46 UTC 2012


On 06/06/2012 09:09 PM, Doug Lea wrote:

On 06/06/12 15:03, Rémi Forax wrote:

tryMonitorEnter is the equivalent of tryLock for synchronized block (monitorEnter/monitorExit). Sorry; yes. This method exists, but seems to be designed to only be used in unusual situations. So the performance is dreadful on JVMs I've tried it on. Working on this method to try to make it perform well enough to use in performance-sensitive code might make a good project for someone. -Doug

I've just checked Hotspot sources, monitorEnter/MonitorExit and tryMonitorEnter have no corresponding intrinsic. That's why you can't use them in ConcurrentHashMap.

Rémi



More information about the core-libs-dev mailing list