All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tonnerre <tonnerre@thundrix.ch>
To: Matthias Urlichs <smurf@smurf.noris.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: single linked list header in kernel?
Date: Thu, 14 Oct 2004 02:16:19 +0200	[thread overview]
Message-ID: <20041014001619.GA19436@thundrix.ch> (raw)
In-Reply-To: <pan.2004.10.13.18.25.41.367757@smurf.noris.de>

[-- Attachment #1: Type: text/plain, Size: 799 bytes --]

Salut,

On Wed, Oct 13, 2004 at 08:25:43PM +0200, Matthias Urlichs wrote:
> I dunno, though -- open-coding a singly-linked list isn't that much of a
> problem; compared to a doubly-linked one, there's simply fewer things that
> can go horribly wrong. :-/

The problem is that 

1. you have to use circular lists

2. going forward is  O(1), going backward is O(N).  This doesn't sound
   like a problem,  but deleting from lists and  alike requires you to
   go back in the list.

I guess  that if  you have lists  that you  edit a lot,  double linked
lists should be  less overhead. However, if you only  walk the lists a
lot, both models should perform equally well.

Insertion is faster, but that's the only good news..

I'm all against them, though. ;)

			    Tonnerre


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  parent reply	other threads:[~2004-10-14  0:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-12 18:15 single linked list header in kernel? Chris Friesen
2004-10-13  5:50 ` Matthias Urlichs
2004-10-13 14:57   ` Chris Friesen
2004-10-13 18:25     ` Matthias Urlichs
2004-10-13 18:55       ` Chris Friesen
2004-10-14  0:19         ` Tonnerre
2004-10-14  0:16       ` Tonnerre [this message]
2004-10-14  4:18         ` Kevin Puetz
2004-10-14 21:39           ` Antonio Vargas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20041014001619.GA19436@thundrix.ch \
    --to=tonnerre@thundrix.ch \
    --cc=linux-kernel@vger.kernel.org \
    --cc=smurf@smurf.noris.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.