Hash32 Bit would be a good thing ...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Hash32 Bit would be a good thing ...

Marten Feldtmann-2
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 !

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/Lb8yBoEq1OUJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
Reply | Threaded
Open this post in threaded view
|

Re: Hash32 Bit would be a good thing ...

John O'Keefe
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
Reply | Threaded
Open this post in threaded view
|

Aw: Re: Hash32 Bit would be a good thing ...

Marten Feldtmann-2
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.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/uV3T9olF_QgJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
Reply | Threaded
Open this post in threaded view
|

Re: Aw: Re: Hash32 Bit would be a good thing ...

John O'Keefe
Marten -

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

John
Reply | Threaded
Open this post in threaded view
|

Aw: Re: Aw: Re: Hash32 Bit would be a good thing ...

Marten Feldtmann-2
abtHash32 is an equivalent hash function, but basicHash is an identity hash function. Quite a difference for using these function !

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/dAdpsMwrwIsJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.