Path: utzoo!attcan!uunet!munnari.oz.au!brolga!uqcspe!batserver.cs.uq.oz.au!grue From: grue@batserver.cs.uq.oz.au (Frobozz) Newsgroups: comp.sys.handhelds Subject: Re: String hashing on the HP-48 Message-ID: <5699@uqcspe.cs.uq.oz.au> Date: 15 Nov 90 00:17:11 GMT References: <11654@life.ai.mit.edu> Sender: news@uqcspe.cs.uq.oz.au Reply-To: grue@batserver.cs.uq.oz.au Lines: 26 bson@rice-chex.ai.mit.edu (Jan Brittenson) writes: > Here is a simple string hashing program. It takes a string as an >argument; it returns in level 2 the string with its first character >incremented, and in level 1 a short integer hash value. It doesn't >check for an empty stack, or that the argument actually is a string. >Be careful - embed it suitably. It's an additive version of the XOR >(for lack of a Saturn XOR instruction) algorithm described in the June >1990 issue of CACM (Peter Pearson: _Fast Hashing Of Variable-Length >Text Strings_). What is wrong with using the built in function BYTES as a hashing function? It calculates some kind of CRC on the thing that is passed to it and it is rather fast. Pauli seeya Paul Dale | Internet/CSnet: grue@batserver.cs.uq.oz.au Dept of Computer Science| Bitnet: grue%batserver.cs.uq.oz.au@uunet.uu.net Uni of Qld | JANET: grue%batserver.cs.uq.oz.au@uk.ac.ukc Australia, 4072 | EAN: grue@batserver.cs.uq.oz | UUCP: uunet!munnari!batserver.cs.uq.oz!grue f4e6g4Qh4++ | JUNET: grue@batserver.cs.uq.oz.au --