Re: Review Request CR#7118743 : Alternative Hashing for String with Hash-based Maps

2012-05-23 Thread Ulf Zibis
Am 24.05.2012 02:22, schrieb Mike Duigou: Looking at the codes of many charsets, the main variance seems to be in the lower 8 bits of a character, especially if the strings belong to the same language. So if we would compose the initial 32-bit values from 4 chars then the murmur3 algorithm could

Re: Review Request CR#7118743 : Alternative Hashing for String with Hash-based Maps

2012-05-23 Thread Ulf Zibis
Am 24.05.2012 02:22, schrieb Mike Duigou: On May 23 2012, at 16:58 , Ulf Zibis wrote: Hi, What about making this approach a little bit more general? See: Bug 6812862 - pro

Re: Review Request CR#7118743 : Alternative Hashing for String with Hash-based Maps

2012-05-23 Thread Mike Duigou
On May 23 2012, at 16:58 , Ulf Zibis wrote: > Hi, > > What about making this approach a little bit more general? > See: Bug 6812862 - provide customizable hash() algorithm in HashMap for speed > tuning It is possible for JDK 8. One option is to provide the hash() method as a virtual extension

Re: Review Request CR#7118743 : Alternative Hashing for String with Hash-based Maps

2012-05-23 Thread Ulf Zibis
Hi, What about making this approach a little bit more general? See: Bug 6812862 - provide customizable hash() algorithm in HashMap for speed tuning + all later comments

Re: Review Request CR#7118743 : Alternative Hashing for String with Hash-based Maps

2012-05-23 Thread David Holmes
On 24/05/2012 2:24 AM, Mike Duigou wrote: Hi Mike; The problem with using instanceof Hashable32 is that is much slower (often more than 25X) than instanceof String. It's slow enough that we won't reasonably consider using instanceof Hashable32 in JDK 8. We have considered making Object implem

Re: Review Request CR#7118743 : Alternative Hashing for String with Hash-based Maps

2012-05-23 Thread Mike Duigou
Hi Remi; As always, thank you for the valuable feedback. On May 23 2012, at 03:42 , Rémi Forax wrote: > Hi Mike, > these comments are for jdk8, I have no time currently to take a look to jdk7 > counterpart. > > First, why do you change make/java/java/Makefile ? It was temporary and should no

hg: jdk8/tl/jdk: 7170169: (props) System.getProperty("os.name") should return "Windows 8" when run on Windows 8

2012-05-23 Thread kurchi . subhra . hazra
Changeset: 0c3d9050c918 Author:khazra Date: 2012-05-23 10:41 -0700 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/0c3d9050c918 7170169: (props) System.getProperty("os.name") should return "Windows 8" when run on Windows 8 Summary: Enable Windows Version 6.2 to be recognized as Win

Re: Review Request CR#7118743 : Alternative Hashing for String with Hash-based Maps

2012-05-23 Thread Mike Duigou
Hi Mike; The problem with using instanceof Hashable32 is that is much slower (often more than 25X) than instanceof String. It's slow enough that we won't reasonably consider using instanceof Hashable32 in JDK 8. We have considered making Object implement Hashable32 and add a virtual extension m

Re: Review Request CR#7118743 : Alternative Hashing for String with Hash-based Maps

2012-05-23 Thread Rémi Forax
Hi Mike, these comments are for jdk8, I have no time currently to take a look to jdk7 counterpart. First, why do you change make/java/java/Makefile ? In java.lang.String, when you compute the HASHING_SEED in the static block, you should ensure that it's never zero in the static block instead o

Re: Code Review Request: 7170169: (props) System.getProperty("os.name") should return "Windows 8" when run on Windows 8

2012-05-23 Thread Chris Hegarty
Looks fine to me. -Chris. On 23/05/2012 02:32, Kurchi Hazra wrote: Hi, This is a minor change to java_props_md.c to return "Windows 8" as the "os.name" for Windows version 6.2. Bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7170169 Webrev: http://cr.openjdk.java.net/~khazra/7170169/w

Re: Review Request CR#7118743 : Alternative Hashing for String with Hash-based Maps

2012-05-23 Thread Paul Sandoz
Hi Mike, On May 23, 2012, at 7:16 AM, Mike Duigou wrote: > [3] althashing "8" webrev : > http://cr.openjdk.java.net/~mduigou/althashing8/8/webrev/ Can the private method HashMap.getForNullKey be removed? Paul.

hg: jdk8/tl/jdk: 7162687: enhance KDC server availability detection

2012-05-23 Thread weijun . wang
Changeset: a2fc04c2dfc8 Author:weijun Date: 2012-05-23 15:51 +0800 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/a2fc04c2dfc8 7162687: enhance KDC server availability detection Reviewed-by: valeriep ! src/share/classes/sun/security/krb5/KdcComm.java ! src/share/classes/sun/securi

Re: Code Review Request: 7170169: (props) System.getProperty("os.name") should return "Windows 8" when run on Windows 8

2012-05-23 Thread Alan Bateman
On 23/05/2012 03:33, David Holmes wrote: On 23/05/2012 11:32 AM, Kurchi Hazra wrote: Hi, This is a minor change to java_props_md.c to return "Windows 8" as the "os.name" for Windows version 6.2. Is there any windows version specific code that might also need updating to allow for Windows 8 a

Re: Review Request CR#7118743 : Alternative Hashing for String with Hash-based Maps

2012-05-23 Thread Mike Skells
Hi Mike, I have a query, why is this implementation limitted to String? Is this by intent? in HashMap the patch for hash calculation is   290     final int hash(Object k) {  291         int h = hashMask;  292         if ((0 != h) && (k instanceof String)) {  293             return h ^ ((String)k)