[Freeciv-Dev] Re: somebody fix struct *player! (was: FoW remove player b
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Wed, May 17, 2000 at 03:36:11PM +0200, Thue Janus Kristensen wrote:
> Just a note: I am going to apply a patch that makes some functions that
> access bitvectors in maphand.c use playerid instead of struct player
> *pplayer.
>
> This should be done as it is a waste of CPU to extract the player number
> (index in the bitvectors) from player struct each time the functions are
> called. (and it is called a lot)
This is probably a great idea for clean code, but I'd just like to
point out that the CPU argument is bogus ;-) The time to dereference a
pointer is a single cycle, (assuming it's in a cache) and that's just
not going to stack up compared to the path-finding code which we all
suspect is the current bottleneck.
Optimisations like this are good for programmer efficiency and code
simplicity, but it's not where we're going to find performance
increases...
Jules
--
Jules Bean | Any sufficiently advanced
jules@{debian.org,jellybean.co.uk} | technology is indistinguishable
jmlb2@xxxxxxxxxxxxxxxx | from a perl script
- [Freeciv-Dev] FoW remove player bug, Thue Janus Kristensen, 2000/05/16
- [Freeciv-Dev] somebody fix struct *player! (was: FoW remove player bug), Reinier Post, 2000/05/16
- [Freeciv-Dev] Re: somebody fix struct *player! (was: FoW remove player bug), Thue Janus Kristensen, 2000/05/16
- [Freeciv-Dev] Re: somebody fix struct *player! (was: FoW remove player bug), David Pfitzner, 2000/05/16
- [Freeciv-Dev] Re: somebody fix struct *player! (was: FoW remove player bug), Reinier Post, 2000/05/17
- [Freeciv-Dev] Re: somebody fix struct *player! (was: FoW remove player bug), Thue Janus Kristensen, 2000/05/17
- [Freeciv-Dev] Re: somebody fix struct *player! (was: FoW remove player bug), Reinier Post, 2000/05/17
- [Freeciv-Dev] Re: somebody fix struct *player! (was: FoW remove player bug), Jules Bean, 2000/05/17
- [Freeciv-Dev] Re: somebody fix struct *player! (was: FoW remove player bug), Reinier Post, 2000/05/17
- [Freeciv-Dev] Re: somebody fix struct *player! (was: FoW remove player bug), Thue Janus Kristensen, 2000/05/17
- [Freeciv-Dev] Re: somebody fix struct *player! (was: FoW remove player bug),
Jules Bean <=
- [Freeciv-Dev] Re: somebody fix struct *player! (was: FoW remove player bug), Thue Janus Kristensen, 2000/05/17
- [Freeciv-Dev] Re: somebody fix struct *player! (was: FoW remove player bug), Thue Janus Kristensen, 2000/05/17
- [Freeciv-Dev] Re: somebody fix struct *player! (was: FoW remove player bug), Mika Korhonen, 2000/05/17
- [Freeciv-Dev] Re: somebody fix struct *player! (was: FoW remove player bug), Thue Janus Kristensen, 2000/05/17
- [Freeciv-Dev] Re: somebody fix struct *player! (was: FoW remove player bug), Mika Korhonen, 2000/05/17
- [Freeciv-Dev] Re: somebody fix struct *player! (was: FoW remove player bug), Robert Brady, 2000/05/17
- [Freeciv-Dev] Re: somebody fix struct *player! (was: FoW remove player bug), Daniel Burrows, 2000/05/17
- [Freeciv-Dev] Re: somebody fix struct *player! (was: FoW remove player bug), Jed Davis, 2000/05/19
- [Freeciv-Dev] Re: somebody fix struct *player! (was: FoW remove player bug), Tony Stuckey, 2000/05/17
[Freeciv-Dev] Re: FoW remove player bug, Daniel Burrows, 2000/05/16
|
|