You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, methods for ChooseHashFunction are expected to return a value in a certain interval (perhaps the size of the hash table) they usually achieve that by computing an integer hash value, and then taking that mod the size of the interval.
Instead, I think hash functions should not know anything about the size of the hash table. They should simply be required to return a value which is a GAP small integer, i.e. a value between 0 and $2^{28}-1$ resp. $2^{60}-1$ (32 vs. 64 bit).
I guess for compatibility reasons, ChooseHashFunction will have to stay as it is, but perhaps we can add a new operation which is similar, but takes only one parameter (omitting the hash len), and which returns hash functions which work as I just described.
This will ultimately allow us to implement hash tables which are more efficient than the current ones, and it also is important if one expects hash tables to grow (which they typically do).
The text was updated successfully, but these errors were encountered:
Currently, methods for
ChooseHashFunction
are expected to return a value in a certain interval (perhaps the size of the hash table) they usually achieve that by computing an integer hash value, and then taking that mod the size of the interval.Instead, I think hash functions should not know anything about the size of the hash table. They should simply be required to return a value which is a GAP small integer, i.e. a value between 0 and$2^{28}-1$ resp. $2^{60}-1$ (32 vs. 64 bit).
I guess for compatibility reasons,
ChooseHashFunction
will have to stay as it is, but perhaps we can add a new operation which is similar, but takes only one parameter (omitting the hash len), and which returns hash functions which work as I just described.This will ultimately allow us to implement hash tables which are more efficient than the current ones, and it also is important if one expects hash tables to grow (which they typically do).
The text was updated successfully, but these errors were encountered: