🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: demon.ip.developers
Article #71

Re: Newshistory checking

#71
From: Nikki Locke
Date: Thu, 15 Jul 1999 00:00
18 lines
1762 bytes
In article <19990714.001917.0AA80202.Q3aa@pierrot.co.uk>, Terrance Richard 
Boyes wrote:
> The other thing I was considering is that unless you make a 
> habit of setting the newsstamp back a long way then reading
> the newshistory file backwards into the hash could give some
> performance improvement when you do actually find a duplicate.

If you use a hash table that stores a linked list of ID's with the same 
hash in each node, then you can read the file forwards, but insert new 
ID's at the front of each list. Reading the file forwards is obviously 
easier, and adding something to the front of a singly linked list is 
faster than adding it to the end. It's not often that you can make a 
design decision that reduces code and increases efficiency at the same 
time!

-- 
Nikki Locke, Trumphurst Ltd.      PC & Unix consultancy & programming
nikki@trmphrst.demon.co.uk            http://www.trumphurst.com/
Technical Details
Message-ID: <VA.000067fc.00f71953@trmphrst.demon.co.uk>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <19990713.200500.0AA80202.PEaa@pierrot.co.uk> <m3908kgtjk.meow@hopf.demon.co.uk> <19990714.001917.0AA80202.Q3aa@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: Nikki Locke <nikki@trmphrst.demon.co.uk>
Subject: Re: Newshistory checking
Date: 1999/07/15
Message-ID: <VA.000067fc.00f71953@trmphrst.demon.co.uk>
X-Deja-AN: 501299971
Content-Transfer-Encoding: 8bit
X-NNTP-Posting-Host: trmphrst.demon.co.uk:158.152.8.60
References: <19990713.200500.0AA80202.PEaa@pierrot.co.uk> <m3908kgtjk.meow@hopf.demon.co.uk> <19990714.001917.0AA80202.Q3aa@pierrot.co.uk>
Content-Type: text/plain; charset=iso-8859-1
X-Complaints-To: abuse@demon.net
X-Trace: news.demon.co.uk 932040134 nnrp-08:9742 NO-IDENT trmphrst.demon.co.uk:158.152.8.60
Organization: Trumphurst Ltd.
Mime-Version: 1.0
Reply-To: nikki@trmphrst.demon.co.uk
Newsgroups: demon.ip.developers