🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #12606

Re: % in hash table

#12606
From: Arthur Chance
Date: Wed, 04 Oct 1995 15:01
14 lines
1353 bytes
In article <DFx5r6.A7@bath.ac.uk> masjhd@bath.ac.uk (James Davenport) writes:
> But there's much less need to use primes than many people think:
> there is a reluctance to do trivial number theory and a mystical
> belief in the power of prime numbers.

True, but if you are working on a machine that's tight on space and
with known maximum number of entries in the table, prime sized tables
will usually take less space than 2**n sized ones, simply because
primes are denser than powers of two. (In case some clever number
theorist can disprove that for some stretch of numbers, I'll qualify
it with "in the range we're talking about". :-) I use power of 2 sizes
when worried about speed and prime sizes when worried about space.
-- 
What if there were no hypothetical questions?
Technical Details
Message-ID: <ARTHUR.95Oct4160152@gold.Smallworld.co.uk>
Path: arc1-ca.pugleaf.net!news.smallworld.co.uk!arthur
References: <43tqr6$3au@mikasa.iol.it> <DFLzD9.Anx@uns.bris.ac.uk> <jgkDFv094.JKJ@netcom.com> <44sjp4$c71@news.jf.intel.com> <DFx5r6.A7@bath.ac.uk>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!news.smallworld.co.uk!arthur
From: arthur@Smallworld.co.uk (Arthur Chance)
Newsgroups: comp.arch,comp.arch.arithmetic,comp.lang.c
Subject: Re: % in hash table
Date: 04 Oct 1995 15:01:52 GMT
Organization: Smallworldwide
Message-ID: <ARTHUR.95Oct4160152@gold.Smallworld.co.uk>
References: <43tqr6$3au@mikasa.iol.it> <DFLzD9.Anx@uns.bris.ac.uk>
 <jgkDFv094.JKJ@netcom.com> <44sjp4$c71@news.jf.intel.com>
 <DFx5r6.A7@bath.ac.uk>
NNTP-Posting-Host: gold.smallworld.co.uk
In-reply-to: masjhd@bath.ac.uk's message of Wed, 4 Oct 1995 10:13:53 GMT