comp.lang.ada
 help / color / mirror / Atom feed
From: Paul Rubin <no.email@nospam.invalid>
Subject: Re: Hash Type Size
Date: Tue, 03 Sep 2013 21:50:18 -0700
Date: 2013-09-03T21:50:18-07:00	[thread overview]
Message-ID: <7xppspkx6d.fsf@ruckus.brouhaha.com> (raw)
In-Reply-To: c6c24f9a-c5ba-4068-be58-c7d1cff4889b@googlegroups.com

Peter Brooks <peter.h.m.brooks@gmail.com> writes:
>> [1] <http://home.roadrunner.com/~jbmatthews/jumble.html#sec2>
> Thank you for that -it's extremely useful. 32% collisions is far too
> high for me, so I certainly need a better hash function.

It doesn't say how many words are in the dictionary, so it doesn't tell
you anything.  A hash function should approximate a random function,
which means you get collisions starting around sqrt(number of slots in
the table).  Re "tailoring the hash function to the data", this is
called perfect hashing and there's lots of stuff online about how to do
it (see google).  It's useful in some situations, but not that many.
What is your actual application?


  parent reply	other threads:[~2013-09-04  4:50 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-18 21:05 Hash Type Size sbelmont700
2013-08-19  1:03 ` AdaMagica
2013-08-19 22:21   ` Randy Brukardt
2013-08-19 22:29     ` Randy Brukardt
2013-08-19 22:12 ` Randy Brukardt
2013-08-31  6:22   ` Peter Brooks
2013-08-31 15:57     ` sbelmont700
2013-09-03  1:47       ` Randy Brukardt
2013-09-03  2:31         ` Peter Brooks
2013-09-03 10:50           ` John B. Matthews
2013-09-03 17:18             ` Peter Brooks
2013-09-03 21:21               ` John B. Matthews
2013-09-04  4:50               ` Paul Rubin [this message]
2013-09-04  4:54                 ` Paul Rubin
2013-09-05 19:30                   ` John B. Matthews
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox