|
From: | Kieran P |
Subject: | Re: [glob2-devel] Another speedup (computeColors) |
Date: | Fri, 7 Sep 2007 22:56:33 +1200 |
Hi again,
I said I'd look at algorithmic improvements to the gradient updating
operations... well, I did, but I chose the wrong starting point. I've
got some ideas to try out (most of which concern avoiding to update all
of the map), but that'll wait a bit.
For now, I've got some other spectacular result for ya :-D - a twofold
increase in the speed of Minimap::computeColors() (on my box at least) :-)
I tried several different things, but what turned out to be the real
problem was the use of floats (and perhaps especially the
float-to-integer conversion which was done for each relevant map square).
So the attached patch just replaces this with fixed-point computations,
and then moves some variable declarations to their 'proper' places
(because that's nicer, for programmers and compilers alike :-).
[Prev in Thread] | Current Thread | [Next in Thread] |