Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2001:
[Freeciv-Dev] Re: [PATCH] Small improvement at genlist and maphand
Home

[Freeciv-Dev] Re: [PATCH] Small improvement at genlist and maphand

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: [PATCH] Small improvement at genlist and maphand
From: Justin Moore <justin@xxxxxxxxxxx>
Date: Thu, 23 Aug 2001 13:18:40 -0400 (EDT)

[ Note: I'm not actually here.  I'm moving.  So this must be someone
  responding in my stead. :) ]

> >    There are ~688K inserts into (up to) ~21K lists, and ~121M searches on
> > those lists based on how often iterators are initialized.  Searches
> > outnumber inserts by ~200:1.  And searches on a sortlist are not only
> > algorithmically faster, but architectually faster.
>
> It's not clear to me that you are counting searches in lists.  If one was just
> iterating though every element of the list, in whatever order they are in,
> wouldn't that show up the same way in the profile?

   Potentially.  OTOH, when I get a moment I'll write up a patch for a
more efficient genlist.  That should also speed up things (both searching
and iterating).  But right now I have to convince my advisor I actually
did research over the summer. :)

-jdm

Department of Computer Science, Duke University, Durham, NC 27708-0129
Email:  justin@xxxxxxxxxxx



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