🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: demon.ip.developers
Article #73

Re: Newshistory checking

#73
From: Jim Segrave
Date: Thu, 15 Jul 1999 00:00
21 lines
1924 bytes
In article <VA.000067fc.00f71953@trmphrst.demon.co.uk>,
Nikki Locke  <nikki@trmphrst.demon.co.uk> wrote:
> 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!

Just to be pedantic, it's a trivial mod to keep track of where the end
item of a linked list is, so appending to the end of a linked list is
really insignificantly more expensive. Nonetheless, your suggestion is
a good one.
Technical Details
Message-ID: <E114lUb-0000o6-00@jes.noc.nl.demon.net>
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> <VA.000067fc.00f71953@trmphrst.demon.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/15
Message-ID: <E114lUb-0000o6-00@jes.noc.nl.demon.net>
X-Deja-AN: 501321195
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> <m3908kgtjk.meow@hopf.demon.co.uk> <19990714.001917.0AA80202.Q3aa@pierrot.co.uk> <VA.000067fc.00f71953@trmphrst.demon.co.uk>
X-Trace: mail2news.demon.nl 932045117 mail2news:14483 mail2news mail2news.demon.nl
Organization: Demon Internet
Reply-To: jes@nl.demon.net
Newsgroups: demon.ip.developers
X-Complaints-To: abuse@demon.net