From: Simon Wright <simon@pushface.org>
Subject: Re: function hash
Date: 31 May 2001 20:21:17 +0100
Date: 2001-05-31T19:21:17+00:00 [thread overview]
Message-ID: <x7v3d9lgw9e.fsf@smaug.pushface.org> (raw)
In-Reply-To: 87hey20yqm.fsf@deneb.enyo.de
Florian Weimer <fw@deneb.enyo.de> writes:
> Jeffrey Carter <jrcarter@acm.org> writes:
>
> > Florian Weimer wrote:
> > >
> > > A hash function returning only 256 different values? Are there any
> > > applications for it?
> >
> > Given the original poster's requirements of handling 500-1000 elements,
> > that's only 2-4 per bin, so it seemed suitable.
>
> In particular with long strings, this will result in a measurable
> performance degradation in comparison to a real hash function because
> of the necessity to perform additional key comparisons.
I don't understand. If there are only 256 bins (not unreasonable) then
there are *bound* to be collisions for a large key space (eg all the
sentences in Jane Eyre).
If you need a perfect hash (eg for the reserved words in Ada) that's
quite a different problem.
next prev parent reply other threads:[~2001-05-31 19:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-05-27 22:07 function hash Nacho Robledo
2001-05-28 0:23 ` James Rogers
2001-05-28 6:47 ` Jeffrey Carter
2001-05-30 20:48 ` Florian Weimer
2001-05-31 0:45 ` Jeffrey Carter
2001-05-31 7:22 ` Florian Weimer
2001-05-31 19:21 ` Simon Wright [this message]
2001-05-31 7:13 ` tmoran
2001-05-28 17:04 ` Nacho Robledo
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox