Re: Hash Tables
- From
Philip Herron <herron.philip@googlemail.com>
- Date
- Aug 6, 2009, 05:17 UTC
- Message-ID
- <4A7A6756.4010305@googlemail.com>
- In-Reply-To
- <4A7A5D9C.7000604@googlemail.com>
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hey
Sorry for the mail i played around with the hash.c and i see how it works now! Feel little bit stupid what threw me off was the alloc_nr( ); but its defined to #define alloc_nr(x) (((x)+16)*3/2) which is quite nice.
and the nr threw me off but i see how it works now its actually the similar as what i was doing in my program, but your grow table was better because of alloc_nr acts like a threshold to grow and scale better, mine just added on another chunk of 32 elements just because it seemed like a good number to get something working.
Question still stands is the hashing function one, which one and why?
Thanks loads, Sorry for bad posts!
- --Phil -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkp6Z1UACgkQAhcOgIaQQ2FvQwCdGAgcuAUNG2/YyyzhXct3J2qc azwAninE/8I+Z4T4h294tCzXlLzmyGqW =Vahj -----END PGP SIGNATURE-----