🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: demon.ip.developers
Article #80

Re: Newshistory checking

#80
From: Jim Segrave
Date: Mon, 19 Jul 1999 00:00
32 lines
2187 bytes
In article <19990716.193917.0AA80202.XVaa@pierrot.co.uk>,
Terrance Richard Boyes <tez@pierrot.co.uk> wrote:
> Jim Segrave <jes@nl.demon.net> wrote:
> 
> [snip]
> 
> > I did some experiments when this first went into ka9q and found (in
> > live testing) that using two smaller tables with two different hash
> > generators worked better than one larger table. You hash the ID two
> > different ways and only if both get a hit do you search the history
> > file. I seem to recall (though it's been a *long* time since I looked
> > at the code), that the Demon customer who added the hashing adopted my
> > suggestion.
> 
> Yep, there's a HASH1 and HASH2 value, though there seem to be
> some problems if both of those overflow (collisions). I couldn't
> find my refs to how to understand the numbers behind a hashing
> algorithm. Any good books ?

The ultimate reference:

D. E. Knuth's The Art of Computer Programming. I think it's in volume
3 - Sorting and Searching, but it might be in SemiNuerical Algorithms
(vol. 1 as I recall).

The DOS version was memory limited and the tradeoff was to search the
file if both hashes of the message ID were in the table, otherwise it
was guaranteed it was a new article. 
 
> However with a bit of experimentation I upped both the HASH values
> from ~32K to ~256K, on 32K unique msgids this has dropped the
> collisions from ~5000 to ~700.
Technical Details
Message-ID: <E116Fjp-0000ko-00@jes.noc.nl.demon.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <19990713.200500.0AA80202.PEaa@pierrot.co.uk> <19990714.210035.0AA80202.TCaa@pierrot.co.uk> <E114k4m-0000SW-00@jes.noc.nl.demon.net> <19990716.193917.0AA80202.XVaa@pierrot.co.uk>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10bb05,75d5f9974c0fd91a
X-Google-Attributes: gid10bb05,public
From: Jim Segrave <jes@nl.demon.net>
Subject: Re: Newshistory checking
Date: 1999/07/19
Message-ID: <E116Fjp-0000ko-00@jes.noc.nl.demon.net>
X-Deja-AN: 502754631
X-Mail2News-Path: news.demon.net!binnen.mail.nl.demon.net!jes.noc.nl.demon.net!jes
References: <19990713.200500.0AA80202.PEaa@pierrot.co.uk> <19990714.210035.0AA80202.TCaa@pierrot.co.uk> <E114k4m-0000SW-00@jes.noc.nl.demon.net> <19990716.193917.0AA80202.XVaa@pierrot.co.uk>
X-Trace: mail2news.demon.nl 932399702 mail2news:17296 mail2news mail2news.demon.nl
Organization: Demon Internet
Reply-To: jes@nl.demon.net
Newsgroups: demon.ip.developers
X-Complaints-To: abuse@demon.net