Re: HashMap - Hybrid approach

2009-06-13 Thread Alex Yakovlev
Doug, On Fri, Jun 12, 2009 at 6:23 PM, Doug Lea wrote: > This was fun to figure out. Performance on some of our > tests involving get() is sensitive to the serial > correlation of slot indices for the keys used across > successive calls. Are there any tests that have get() order the same as put(

RE: Faster HashMap implementation

2009-06-13 Thread Robert DiFalco
Sorry for inserting myself into this thread but this has been an interesting conversation filled with a lot of trade-offs and optimization techniques for edge cases. It occurred to me that one of the problems is that the traditional HashMap implementation relies on inheritance rather than compositi

Re: Faster HashMap implementation

2009-06-13 Thread Doug Lea
Ismael Juma wrote: Out of curiosity, do you know if any tests have been done with an open addressing scheme similar to Python dictionaries[1] in Java? Near the top, there's a comment explaining how it works and the motivation. More or less. This is roughly similar to the schemes I mentioned a

Re: Faster HashMap implementation

2009-06-13 Thread Ismael Juma
Hi Doug, Doug Lea writes: > While open-addressing is used in > IdentityHashMap (and in a very specialized form in > ThreadLocal), you cannot live with linear-probed > versions otherwise: Many user-defined hashCodes > (and some JDK-defined ones too!) are not very good. Out of curiosity, do you kn