- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I write dbj hash function in Fortran.
If I want to handle 10,000,000 data in hash data structure, how much hashsize is good?
I will resolve the collision with chaining.Regard.Park.
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
A compromise has to be made between (i) having the hash table so large that a significant part goes unused and (ii) making the hash table too small, causing too many collisions, which then have to be resolved by following a chain.
Much depends on the hash values that occur and their distribution, but you should make the hash table about a third larger than the minimum size.
Note that in some cases the slower but more memory-efficient perfect-hashing algorithms may be appropriate.
Much depends on the hash values that occur and their distribution, but you should make the hash table about a third larger than the minimum size.
Note that in some cases the slower but more memory-efficient perfect-hashing algorithms may be appropriate.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page