Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2001:
[Freeciv-Dev] Re: Profiling Civserver again
Home

[Freeciv-Dev] Re: Profiling Civserver again

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Jason Dorje Short <jshort@xxxxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Profiling Civserver again
From: Paul Zastoupil <paulz@xxxxxxxxxxxx>
Date: Wed, 25 Jul 2001 16:32:44 -0700

On Wed, Jul 25, 2001 at 07:01:52PM -0400, Jason Dorje Short wrote:
> Gregory Berkolaiko wrote:
> 
> > Since the most of the tiles are of the type "8" -- inner tiles, wouldn't
> > it be simpler just to check for type 8 and if yes, don't do any more
> > checks and if not, then do the normalize bit.
> > 
> > That is, in Jason's patch add
> > 
> > char is_border_tile=((center_y==0)||(center_y==map.ysize-1) ||
> >                     (center_x==0)||(center_x==map.xsize-1));
> > 
> > before the for() loop and then inside the loop do
> > 
> > if (is_bother_tile) {
> > /* do the renormalization thing */
> > }
> > 
> > and that's it.
> > Of course people might want to do some more profiling (sorry, cannot do it
> > myself, I am away), but I am 95% sure that the above will be almost as
> > fast as Trent's algorithm.
> 
> I'd guess it would be faster, since there's less overhead to gain the
> same speedup for 95% of all tiles.
> 
> An updated patch will follow in a bit.

And I'll profile it.  Scientific method etc...

-- 
Paul Zastoupil


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