Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2003:
[Freeciv-Dev] Re: freeciv profile data
Home

[Freeciv-Dev] Re: freeciv profile data

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: freeciv profile data
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Mon, 20 Oct 2003 06:48:33 +0000 (GMT)

On Sun, 19 Oct 2003, Jason Short wrote:
> Obviously really_generate_warmap is a candidate for optimization.So I
> looked at this function, and found an easy optimization.WARMAP_COST
> and WARMAP_SEACOST are called more than necessary.Currently these are
> just a few operations each, but under gen-topologies they have a few
> extra operations.There are two calls: WARMAP_[SEA]COST(x, y) and
> WARMAP_[SEA]COST(x1, y1).I made a patch to cache both values, then
> profiledthe result.This gave a significant decrease in the runtime of
> that function and a very slight overall decrease.I'm not sure if
> cacheing either or both are worth it.I'll send more info to RT.

warmap is being phased out in favour of pf, so I do not think tinkering
much with it is a good use of anyone's time.

  - Per



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