Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!decvax!yale-com!leichter From: leichter@yale-com.UUCP (Jerry Leichter) Newsgroups: net.followup Subject: Re: Hash table size selection Message-ID: <2920@yale-com.UUCP> Date: Mon, 13-Feb-84 12:58:25 EST Article-I.D.: yale-com.2920 Posted: Mon Feb 13 12:58:25 1984 Date-Received: Wed, 15-Feb-84 00:48:46 EST References: proper.997 Lines: 10 There is no reason why a hash table as such has to have a prime number of entries. Some hashing ALGORITHMS do better with a prime number of entries; some, in fact, REQUIRE it. If you can be more specific about the particular hashing algorithm used, I might be able to explain the relevance of a prime table size. (Note: In many cases, the use of a prime size is more a matter of superstition than an actual requirement of the algorithm; many of these algorithms will work just as well provided the size does not have any small prime factors; in fact, in many cases any odd number will do quite well.) -- Jerry