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]
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Profiling Civserver again
From: Trent Piepho <xyzzy@xxxxxxxxxxxxx>
Date: Tue, 24 Jul 2001 20:32:27 -0700 (PDT)

On Tue, 24 Jul 2001, Ross W. Wetmore wrote:
> 2)  TRUE, map and map_adjust_x() will need to be defined in all functions
>     that call the macro, whereas they weren't for the function call.

Of course the function prototype for normalize_map_pos() is in the same header
file that defines map_adjust_x(), so that shouldn't be a problem.

But really, you're just covering up the real inefficiency.  It would be more
productive to figure out why map coordinates get normalized so many times, and
reduce that number.

I see lots of places which iterate around the 8 neighbors of a tile,
normalizing the coordinates each time.  If the tile isn't on the boundary of
the map, and most tiles aren't, then all those normalizations are unnecessary. 



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