Re: RFR: JDK-8031043 ClassValue's backing map should have a smaller initial size

2016-06-23 Thread Peter Levart
Hi, Doug suggested to try another variant of resolving hash collisions in open-addressing table - using a secondary hash for increment value of consecutive probes. Since Java Objects provide only one hashCode() function, "secondary" hash is computed from primary hash by xorShift(hashCode), fo

Re: RFR: JDK-8031043 ClassValue's backing map should have a smaller initial size

2016-06-13 Thread Peter Levart
Hi, I explored various strategies to minimize worst-case lookup performance for MethodType keys in LinearProbeHashtable. One idea is from the "Hopscotch hashing" algorithm [1] which tries to optimize placement of keys by moving them around at each insertion or deletion. While a concurrent Hop

Re: RFR: JDK-8031043 ClassValue's backing map should have a smaller initial size

2016-06-12 Thread Peter Levart
Hi, Claes, Thanks for starting to look into this. On 06/12/2016 06:28 PM, Claes Redestad wrote: Hi, this seems quite promising. A bit too much to review in one go, but let me start with some musings while I digest it more fully: 49 /** 50 * A special key that is used to overwr

Re: RFR: JDK-8031043 ClassValue's backing map should have a smaller initial size

2016-06-12 Thread Claes Redestad
Hi, this seems quite promising. A bit too much to review in one go, but let me start with some musings while I digest it more fully: 49 /** 50 * A special key that is used to overwrite a key when the entry is removed. 51 */ 52 private static final class Tombstone {

RFR: JDK-8031043 ClassValue's backing map should have a smaller initial size

2016-06-09 Thread Peter Levart
Hi, The patch for this issue is a result of the following discussion on mlvm-dev list: http://mail.openjdk.java.net/pipermail/mlvm-dev/2016-May/006602.html I propose the following improvement to the implementation of ClassValue API: http://cr.openjdk.java.net/~plevart/misc/ClassValue.Alterna