[Freeciv-Dev] Re: PATCH: cleanup in fill_tile_sprite_array (PR#1016)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Fri, Oct 19, 2001 at 09:27:42PM -0400, Ross W. Wetmore wrote:
>
> Why do you *always* go for the O(n) solution to any problem?
> Is this a conspiracy to slow down the codebase?
>
> In this case do the computation once and stash it in an array.
> Then do an array lookup.
>
> If you put this where the enums are assigned, then you can even
> define it statically with a note to make sure you change the two
> elements in tandem.
>
> Every time you add one of the "little" inefficiencies you are
> killing the performance. It may be the death of a thousand cuts,
> but you seem to be very prolific at cutting, and the fixes will
> be a thousand fixes to recover.
Feel free to make a patch.
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
"Of course, someone who knows more about this will correct me if I'm
wrong, and someone who knows less will correct me if I'm right."
-- David Palmer (palmer@xxxxxxxxxxxxxxxxxx)
- [Freeciv-Dev] PATCH: cleanup in fill_tile_sprite_array (PR#1016), jdorje, 2001/10/15
- [Freeciv-Dev] Re: PATCH: cleanup in fill_tile_sprite_array (PR#1016), Raimar Falke, 2001/10/15
- [Freeciv-Dev] Re: PATCH: cleanup in fill_tile_sprite_array (PR#1016), Jason Dorje Short, 2001/10/15
- [Freeciv-Dev] Re: PATCH: cleanup in fill_tile_sprite_array (PR#1016), Raimar Falke, 2001/10/15
- [Freeciv-Dev] Re: PATCH: cleanup in fill_tile_sprite_array (PR#1016), Jason Dorje Short, 2001/10/16
- [Freeciv-Dev] Re: PATCH: cleanup in fill_tile_sprite_array (PR#1016), Raimar Falke, 2001/10/17
- [Freeciv-Dev] Re: PATCH: cleanup in fill_tile_sprite_array (PR#1016), Jason Dorje Short, 2001/10/17
- [Freeciv-Dev] Re: PATCH: cleanup in fill_tile_sprite_array (PR#1016), Jason Dorje Short, 2001/10/17
- [Freeciv-Dev] Re: PATCH: cleanup in fill_tile_sprite_array (PR#1016), Ross W. Wetmore, 2001/10/19
- [Freeciv-Dev] Re: PATCH: cleanup in fill_tile_sprite_array (PR#1016),
Raimar Falke <=
- [Freeciv-Dev] Re: PATCH: cleanup in fill_tile_sprite_array (PR#1016), Ross W. Wetmore, 2001/10/20
- [Freeciv-Dev] Re: PATCH: cleanup in fill_tile_sprite_array (PR#1016), Raimar Falke, 2001/10/18
- [Freeciv-Dev] Re: PATCH: cleanup in fill_tile_sprite_array (PR#1016), Jason Dorje Short, 2001/10/18
- [Freeciv-Dev] Re: PATCH: cleanup in fill_tile_sprite_array (PR#1016), Raimar Falke, 2001/10/18
|
|