|
From: | Kieran P |
Subject: | Re: [glob2-devel] Another speedup (computeColors) |
Date: | Fri, 7 Sep 2007 09:15:25 +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 :-).
/Erik
PS: Have you considered adding a '-Wall' switch or similar to the
compiler invocation?
(Not that I've noticed anything horrible - it's just good practise afaik)
_______________________________________________
glob2-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/glob2-devel
[Prev in Thread] | Current Thread | [Next in Thread] |