Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2003:
[Freeciv-Dev] (PR#3782) Small clean of flush region callculation in upda
Home

[Freeciv-Dev] (PR#3782) Small clean of flush region callculation in upda

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: bursig@xxxxxxxxx
Subject: [Freeciv-Dev] (PR#3782) Small clean of flush region callculation in update_mapcanvas(...)
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 26 Mar 2003 18:31:45 -0800
Reply-to: rt@xxxxxxxxxxxxxx

[bursig - Mon Mar 24 18:04:04 2003]:

> Dnia 2003.03.24 18:44 Jason Short napisa³(a):
> > On Mon, 2003-03-24 at 12:21, Rafa?? Bursig wrote:
> > >
> > > Hi
> > >
> > > This code check if we refresh only one tile and make simple dirty
> > > region calculation in update_mapcanvas(...)
> >
> > What is the advantage of this?  It doesn't change the behavior.  Is
> it
> > supposed to just be faster?
> >
> Yes effect is the same ( and should be the same ) but you don't make 3
> x "*" and 4 x "/" operations.

I think this is severe overkill for minimal gain.

If you are looking for small gains, a better (though still miniscule, I
imagine) gain can be gotten by replacing (NORMAL_TILE_WIDTH / 2) by
HALF_TILE_WIDTH throughout the code (and the same for NORMAL_TILE_HEIGHT).

jason



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