[Freeciv-Dev] Re: Profiling Civserver again
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Jason is right when he says that cleaning up map_adjust_x should do good.
I think a good portion of CPU time spent in get_map_tile is wasted on two
modulus ( % ) operations in map_adjust_x. One is completely unnecessary,
as was mentioned earlier. Is it possible to get rid of the second one(s)
in a safe way without converting the macro to a function?
Err, and a stupid question, how does int -> unsigned int conversion work?
Is the behaviour standard?
G.
On Tue, 31 Jul 2001, Ross W. Wetmore wrote:
> Personally I prefer doing something like the following in map.h ...
>
> #ifndef MAP_GET_TILE_FUNCTION
>
> /* WARNING: these are macros - do not use arguments with side effects */
> #define map_get_tile(x,y) ( \
> ((unsigned)(y) >= (unsigned)map.ysize) \
> ? &void_tile \
> : map_get_tile_unchecked(map_adjust_x(x),(y)))
- [Freeciv-Dev] Re: Profiling Civserver again, (continued)
- [Freeciv-Dev] Re: Profiling Civserver again, Gaute B Strokkenes, 2001/07/29
- [Freeciv-Dev] Re: Profiling Civserver again, Ross W. Wetmore, 2001/07/29
- [Freeciv-Dev] Re: Profiling Civserver again, Ross W. Wetmore, 2001/07/29
- [Freeciv-Dev] Re: Profiling Civserver again, Jason Dorje Short, 2001/07/30
- [Freeciv-Dev] Re: Profiling Civserver again, Trent Piepho, 2001/07/30
- Message not available
- [Freeciv-Dev] Re: Profiling Civserver again, Ross W. Wetmore, 2001/07/30
- Message not available
- Message not available
- Message not available
- Message not available
- [Freeciv-Dev] Re: Profiling Civserver again, Paul Zastoupil, 2001/07/31
- [Freeciv-Dev] Re: Profiling Civserver again, Jason Dorje Short, 2001/07/31
- [Freeciv-Dev] Re: Profiling Civserver again, Thue, 2001/07/31
- [Freeciv-Dev] Re: Profiling Civserver again, Ross W. Wetmore, 2001/07/31
- [Freeciv-Dev] Re: Profiling Civserver again,
Gregory Berkolaiko <=
- [Freeciv-Dev] Re: Profiling Civserver again, Gregory Berkolaiko, 2001/07/29
[Freeciv-Dev] Re: Profiling Civserver again, 蔡恆華, 2001/07/31
|
|