Hash32 Bit would be a good thing ...

30 views
Skip to first unread message

Marten Feldtmann

unread,
Aug 26, 2011, 4:31:52 PM8/26/11
to va-sma...@googlegroups.com
hash values of objects are calculated as 16bit values - but I think, that a 32bit hash function would be a warm welcome in the product !

John O'Keefe

unread,
Aug 27, 2011, 8:21:46 AM8/27/11
to va-sma...@googlegroups.com
Marten -

Long term we want to make the hashing algorithm used for keyed collections
pluggable. 16-bit and 32-bit hashers would be supplied with the product --
you would be free to implement your own hasher (maybe you want a 24-bit
hash).

But this must be done carefully since switching out the hasher means that
the collection must be rehashed. This would be easier with a pluggable
hasher because plugging in the hasher would cause the collection to be
rehashed automatically (as opposed to simply changing to 32-bit and then
wondering which collections needed rehashing, which did not, and which had
already been rehashed.

This would also make the image smaller because there is a lot of duplicate
code between the existing 'high capacity' keyed collections and the normal
ones

John

--
View this message in context: http://forum.world.st/Hash32-Bit-would-be-a-good-thing-tp3772024p3772931.html
Sent from the Instantiations mailing list archive at Nabble.com.

John O'Keefe

unread,
Aug 27, 2011, 8:26:23 AM8/27/11
to va-sma...@googlegroups.com
Marten -

John

--
View this message in context: http://forum.world.st/Hash32-Bit-would-be-a-good-thing-tp3772024p3772938.html

Marten Feldtmann

unread,
Aug 27, 2011, 12:09:57 PM8/27/11
to va-sma...@googlegroups.com
But perhaps it would be nice to introduce the 32bit hasher function earlier - and the pluggable stuff may come later. The 32bit hash values are useful now - when working with lots of objects.

John O'Keefe

unread,
Aug 27, 2011, 1:05:05 PM8/27/11
to va-sma...@googlegroups.com
Marten -

But, as you know, there already is a 32-bit hash function -- abtHash32.

John

--
View this message in context: http://forum.world.st/Hash32-Bit-would-be-a-good-thing-tp3772024p3773311.html

Marten Feldtmann

unread,
Aug 27, 2011, 2:44:18 PM8/27/11
to va-sma...@googlegroups.com
abtHash32 is an equivalent hash function, but basicHash is an identity hash function. Quite a difference for using these function !

Reply all
Reply to author
Forward
0 new messages