comp.lang.ada
 help / color / mirror / Atom feed
From: "John B. Matthews" <nospam@nospam.invalid>
Subject: Re: Hash Type Size
Date: Tue, 03 Sep 2013 17:21:21 -0400
Date: 2013-09-03T17:21:21-04:00	[thread overview]
Message-ID: <nospam-717EC9.17212103092013@news.aioe.org> (raw)
In-Reply-To: c6c24f9a-c5ba-4068-be58-c7d1cff4889b@googlegroups.com

In article <c6c24f9a-c5ba-4068-be58-c7d1cff4889b@googlegroups.com>,
 Peter Brooks <peter.h.m.brooks@gmail.com> wrote:

> On Tuesday, 3 September 2013 12:50:04 UTC+2, John B. Matthews  wrote:
> > 
> > As a concrete example, this program [1] tallies collisions 
> > using an  instance of Ada.Strings.Bounded.Hash on words found 
> > in a dictionary.  While it's specific to GNAT, it may suggest 
> > how to obtain a baseline against which to compare your 
> > implementation(s).
> > 
> > [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.

You are welcome. That 2009 data was obtained using GNAT 4.3.4; 
newer versions are typically better. For example, the GNAT 4.6 
implementation yields the following result:

./collisions
 0: 305643 (77.72%)
 1: 76947 (19.57%)
 2: 9790 (2.49%)
 3: 805 (0.20%)
 4: 56 (0.01%)
 5: 1 (0.00%)

-- 
John B. Matthews
trashgod at gmail dot com
<http://sites.google.com/site/drjohnbmatthews>

  reply	other threads:[~2013-09-03 21:21 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 [this message]
2013-09-04  4:50               ` Paul Rubin
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