Re: An Alternative Hashing Alternative

2012-06-06 Thread Rémi Forax
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 dre

Re: An Alternative Hashing Alternative

2012-06-06 Thread Doug Lea
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 o

Re: An Alternative Hashing Alternative

2012-06-06 Thread Rémi Forax
On 06/06/2012 07:23 PM, Doug Lea wrote: On 06/06/12 13:09, Rémi Forax wrote: I haven't read the whole code (I need a blackboard :) (The mostly-non-blocking retries here lead to a lot of code sprawl. Macros would help :-) I wonder if it's not better to use unsafe.tryMonitorEnter() instead of

Re: An Alternative Hashing Alternative

2012-06-06 Thread Doug Lea
On 06/06/12 13:09, Rémi Forax wrote: I haven't read the whole code (I need a blackboard :) (The mostly-non-blocking retries here lead to a lot of code sprawl. Macros would help :-) I wonder if it's not better to use unsafe.tryMonitorEnter() instead of a lock bit. I need a lock with a form o

Re: An Alternative Hashing Alternative

2012-06-06 Thread Rémi Forax
I haven't read the whole code (I need a blackboard :) I wonder if it's not better to use unsafe.tryMonitorEnter() instead of a lock bit. Also the class depends on LongAdder, is it a requirement or an AtomicLongUpdater can be used ? cheers, Rémi On 06/06/2012 06:51 PM, Doug Lea wrote: On 06/0

Re: An Alternative Hashing Alternative

2012-06-06 Thread Doug Lea
On 06/06/12 12:22, Doug Lea wrote: I just posted the following to the concurrency-interest list. I'll send a follow-up on tie-ins to core-lib issues next. The main issue is whether adding generic overflow-handling techniques to hash table classes (as used here for ConcurrentHashMap, but variat

Re: An Alternative Hashing Alternative

2012-06-06 Thread Bob Lee
Whoa! This is awesome. Bob On Wed, Jun 6, 2012 at 9:22 AM, Doug Lea wrote: > > I just posted the following to the concurrency-interest list. > I'll send a follow-up on tie-ins to core-lib issues next. > > ... > > > Finally acting on an old idea, I committed an update to > ConcurrentHashMap (cur

An Alternative Hashing Alternative

2012-06-06 Thread Doug Lea
I just posted the following to the concurrency-interest list. I'll send a follow-up on tie-ins to core-lib issues next. ... Finally acting on an old idea, I committed an update to ConcurrentHashMap (currently only the one in our jdk8 preview package, as jsr166e.ConcurrentHashMap8) that much mo