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.3 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, REPLYTO_WITHOUT_TO_CC autolearn=no 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-10 15:27:03 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!deine.net!teaser.fr!enst!enst.fr!not-for-mail From: "Steven Deller" Newsgroups: comp.lang.ada Subject: RE: hashing Date: Wed, 10 Apr 2002 17:24:43 -0400 Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: avanie.enst.fr 1018477622 43854 137.194.161.2 (10 Apr 2002 22:27:02 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Wed, 10 Apr 2002 22:27:02 +0000 (UTC) Return-Path: X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 In-Reply-To: <1b2t8.507$na.19833@news8-gui.server.ntli.net> Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.8 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: comp.lang.ada mail<->news gateway List-Unsubscribe: , Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:22332 Date: 2002-04-10T17:24:43-04:00 > -----Original Message----- > [mailto:comp.lang.ada-admin@ada.eu.org] On Behalf Of chris.danx > Sent: Wednesday, April 10, 2002 5:31 PM > To: comp.lang.ada@ada.eu.org > Subject: hashing > Hi, > > Does anyone have a good hash function for strings (length is > arbitary, number of buckets is determined when package is I'd check out the PERL 5 sources. The hashing function there seems to be excellent for numerous cases I have looked into. Not sure, but the internal documentation might just explain the algorithm without having to reverse engineer C code. Other than that, I'd try one of the numerous ISO-defined hash functions, such as CRC-32, etc. I did a web search on "hash function algorithms" and came up with NUMEROUS interesting sites. >...> > p.s. does anyone have any uses for circular lists? Tom Swans > Tp5.5 book mentions them, what are they used for? Just curious... I have used circular lists in numerous buffering situations where a simple double-buffer is insufficient. Typically the situation is one where the list is created once and the "head" and "tail" positions move as data is put in and taken out. Using a circular list allows different sizes to be put in and taken out. I've also used a 10ary-buffer system (the buffers themselves formed a circular list) to meet some system transfer and error-correction requirements. Some transmission systems use a (short) counter of items sent and look for return ACK's for the items; that algorithm is easy to write using a circular list. > p.p.s. should performance/complexity information be included? > I seem to recall a conversation on this a while back, but > can't remember if ppl thought it was a good idea. Complexity information always raises its head at some point. Best to include it. Regards, Steve