[Freeciv-Dev] Re: (PR#4075) rewrite base_map_to_city_map
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Jason Short wrote:
> I was looking at city.c today and notice that base_city_map_to_map is
> encoded using a brute-force approach. I instead rewrote it using
> map_distance_vector (this function was probably not available with the
> current version was written). This makes the function algorithmically
> faster - O(1) versus O(n) - although constant factors are likely to have
> an even larger effect. And of course it's more elegant.
I should also mention that savefiles generated by autogames are
unaffected by this change.
jason
|
|