glob2-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [glob2-devel] gradient improvement


From: Nuage
Subject: Re: [glob2-devel] gradient improvement
Date: Tue, 21 Mar 2006 18:20:47 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20051102

Thanks for the ideas. I did applied the patch, can you check if they are
correct, plz. Compile one of them by uncommenting the #define you want: (I know
the name are only the names of the guy who added the new idea, give me a new
name if you want something politically correct).

Note that I did not have checked the consistency /validity of the "Kai" algo 
yet.

#define GLOB2_SIMPLE_GRADIENT_COMPUTE
//#define GLOB2_SIMON_GRADIENT_COMPUTE
//#define GLOB2_KAI_GRADIENT_COMPUTE

I ran a test on a 256x256 map. I open a saved game (pleoght_speed.game) for 60s,
without changing anything, not moving the cursor. All other X processes are
closed. I made 2 runs for each algo (intervealed). It was run in "blanc" once
before for libs loading, just in case. It was compiled with these flags:
CFLAGS="-O3 -march=athlon-xp" CXXFLAGS="-O3 -march=athlon-xp" ./configure
Here are the results found in Engine.log.


*orig algo*

cpuSumCountStats = 1197
averageCpuUsage = 38.088972%

cpuSumCountStats = 1196
averageCpuUsage = 39.005017%

(mean averageCpuUsage 38.5469945%)

*simon algo*

cpuSumCountStats = 1197
averageCpuUsage = 39.241855%

cpuSumCountStats = 1196
averageCpuUsage = 40.361622%

(mean averageCpuUsage 39.8017385%)

*kai algo*

cpuSumCountStats = 1204
averageCpuUsage = 38.286960%

cpuSumCountStats = 1203
averageCpuUsage = 38.815461%

(mean averageCpuUsage 38.5512105%)


1- You can see that the "hand" measured time if precise enough. (less than 0.7%
relative "error").
2- All mean speed are more similar than what I did expect. Max 3.255% relative
differences.
3- The variances are higher then what I did expect. Max 6% relative differences.
4- The best mean speed is using the "orig" algo. But the variance seem to be 
high.

In this test, the new algos (Simon+Kai) are actually slower. If I remember well,
it was about 1% faster in 128x128 maps. My conclusion is that the complexity
added by the simon/kai algo is too high compair to the speed gain.

Once again, beware of CPU specifics improvements. Some "random" effects may
result in great optimization on one given CPU because of cache/TLB/jump aliasing
or something. For this reason I'd like someone else to test in on another CPU. I
have an AMD athlon XP 3200+ downclocked to 180mhz * 12 because of a motherboard
bug (thx asus).

Once again too, don't make tests without compiler optimization activated, thx.


Nuage




reply via email to

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