From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,eec376a334ad59ed X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-04-11 16:18:44 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!supernews.com!207.217.77.43.MISMATCH!newsfeed1.earthlink.net!newsfeed.earthlink.net!feed2.news.rcn.net!rcn!wn14eed!wn2feed!worldnet.att.net!204.127.198.204!attbi_feed4!attbi.com!rwcrnsc54.POSTED!not-for-mail From: Wannabe h4x0r Subject: RE: hashing(HATs. A more efficient algorithm?) Newsgroups: comp.lang.ada References: User-Agent: Pan/0.11.1 (Unix) Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Comment-To: "Steven Deller" Message-ID: NNTP-Posting-Host: 12.245.48.122 X-Complaints-To: abuse@attbi.com X-Trace: rwcrnsc54 1018567122 12.245.48.122 (Thu, 11 Apr 2002 23:18:42 GMT) NNTP-Posting-Date: Thu, 11 Apr 2002 23:18:42 GMT Organization: AT&T Broadband Date: Thu, 11 Apr 2002 23:18:42 GMT Xref: archiver1.google.com comp.lang.ada:22394 Date: 2002-04-11T23:18:42+00:00 List-Id: 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