From: Wannabe h4x0r <chris@dont.spam.me>
Subject: RE: hashing(HATs. A more efficient algorithm?)
Date: Thu, 11 Apr 2002 23:18:42 GMT
Date: 2002-04-11T23:18:42+00:00 [thread overview]
Message-ID: <mRot8.209679$Yv2.66927@rwcrnsc54> (raw)
In-Reply-To: mailman.1018477621.31315.comp.lang.ada@ada.eu.org
Lately I've been using Hashed Array Trees(or Tables),
which have cut the execution time by about %40, and has
given me a memory savings of about %20-%30. Note that I'm
just progressing from the beginner to the intermediate
stage in my "skillz".
Basically, you start with an initial array of n number of
elements.
The first element is a "pointer"(however one may choose to
define that) to the last element of the array. When the
array is filled to n-2 elements, automatically add x
additional elements to the array, and them set the
pointer in the first element to point to the end of the
array again(which should be n+x_l).
One can use any number of methods to decide how many
elements to add at any time, it's not fixed.
For an additional bit of buffer overflow protection, one
could set the pointer to point to n-2 (or n-1 or
whatever) depending on whatever makes sense at the time.
This is about the simplest damn algorithm in the world,
at least to me it is. Heh.
Chris
next prev parent reply other threads:[~2002-04-11 23:18 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-10 21:31 hashing chris.danx
2002-04-10 21:24 ` hashing Steven Deller
2002-04-10 22:41 ` hashing Nick Williams
2002-04-10 23:36 ` hashing chris.danx
2002-04-11 14:18 ` hashing joevl
2002-04-15 15:32 ` hashing Ken Burtch
2002-04-11 23:18 ` Wannabe h4x0r [this message]
2002-04-11 23:29 ` hashing(HATs. A more efficient algorithm?) chris.danx
2002-04-12 7:24 ` Wannabe h4x0r
2002-04-12 15:00 ` Chad R. Meiners
2002-04-12 17:22 ` tmoran
2002-04-10 21:56 ` hashing Chad R. Meiners
2002-04-10 23:43 ` hashing Ted Dennison
2002-04-11 16:12 ` hashing Georg Bauhaus
2002-04-11 22:36 ` hashing Simon Wright
2002-05-03 10:16 ` hashing Antonio Duran
2002-05-05 13:55 ` hashing Robert Dewar
2002-05-06 20:42 ` hashing Antonio Duran
2002-05-06 23:36 ` hashing Jeffrey Carter
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox