id'hash changed to generate some low bits set
authorClaus Gittinger <cg@exept.de>
Fri, 21 Mar 1997 16:07:33 +0100
changeset 2478 fdbf46a6da23
parent 2477 3fb0bf03bb5a
child 2479 6d9c516e04d8
id'hash changed to generate some low bits set
Object.st
--- a/Object.st	Fri Mar 21 15:45:05 1997 +0100
+++ b/Object.st	Fri Mar 21 16:07:33 1997 +0100
@@ -1385,9 +1385,9 @@
 	 * make it as large as possible; since most hashers use the returned
 	 * key and take it modulu some prime number, this will allow for
 	 * better distribution (i.e. bigger empty spaces) in hashed collection.
-	 * we could shift it up to the 30 bit limit - not making it negative.
 	 */
-	hash <<= __HASH_SHIFT__;
+	hash = (hash << 11) | hash; /* 22 bits */
+	hash <<= 8;		    /* 30 bits */
 	RETURN ( __MKSMALLINT(hash) );
     }
 %}.
@@ -5656,6 +5656,6 @@
 !Object class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Object.st,v 1.181 1997-03-19 18:46:19 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Object.st,v 1.182 1997-03-21 15:07:33 cg Exp $'
 ! !
 Object initialize!