Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2003:
[Freeciv-Dev] Re: list cleaning
Home

[Freeciv-Dev] Re: list cleaning

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Raimar Falke <i-freeciv-lists@xxxxxxxxxxxxx>
Cc: "Per I. Mathisen" <per@xxxxxxxxxxx>, <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: list cleaning
From: Vasco Alexandre Da Silva Costa <vasc@xxxxxxxxxxxxxx>
Date: Mon, 1 Dec 2003 00:14:49 +0000 (WET)

On Sun, 30 Nov 2003, Raimar Falke wrote:

> > > 4) lazy deletion with implicit pruning at leaving the outer most
> > > iterator
> > >  - requires balanced iterators (which have medium/high code impact)
> > >  - low code impact by itself
> > >  - low speed impact
> > >  - low memory impact
> > >  - safe
> >
> > I prefer this solution in combination with 2).
>
> Can you describe this?
>
> > Because lists which haven't been modified don't get tested, for one.
>
> I assumed two optimizations which are orthogonal to these solutions:
>  - detect the need to do pruning by a "deleted" flag (3,4,5)
>  - do a non-lazy unlink when there are no outer iterators (4)

Yes, that is about my idea.

The only difference in my concept is that instead of using a deleted
flag, there is an ndeleted field. It doesn't make much difference,
but this way list pruning can stop once all deleted nodes have been
pruned.

---
Vasco Alexandre da Silva Costa @ Instituto Superior Tecnico, Lisboa



[Prev in Thread] Current Thread [Next in Thread]