Re: [Wormux-dev] Profiling Wormux

2010-09-06 Par sujet Kurosu
Le 06/09/2010 18:29, Matthieu Fertré a écrit : > uint l,r,t,b; > body->GetTestRect(l,r,t,b); > SetTestRect(l,r,t,b); In fact I think it's trickier. The test rect for body is always the same (see their definition in data/body/movements.xml); this can be verified when moving: the rectangle doesn't

Re: [Wormux-dev] Profiling Wormux

2010-09-06 Par sujet Matthieu Fertré
Hi, Le 05/09/2010 20:54, Mikko Vartiainen a écrit : > On Sun, Sep 5, 2010 at 7:31 PM, Mikko Vartiainen > wrote: > >> Animation seems to be the big obstacle on 4x10 case. I made crude test >> (see below) with animations, and this alone changes completely >> unplayable game to about 10 fps game

Re: [Wormux-dev] Profiling Wormux

2010-09-06 Par sujet Mikko Vartiainen
Attached is patch which has all of my optimisations from yesterday and today. src/character/character.cpp: This change is not in finished form, but just to test the effect if FootsInVacuum wasn't calculated two times for every cycle. Gain is very noticeable. To finish it, FootsInVacuum result shou

Re: [Wormux-dev] Profiling Wormux

2010-09-06 Par sujet Mikko Vartiainen
On Mon, Sep 6, 2010 at 9:43 AM, Kurosu wrote: >> BTW, Cortex-A8 also lacks integer division which needs to be done in >> software, that's why you see __aeabi_uidivmod and the likes... > > Sounds like *unsigned* integer division, but still I didn't know about it. > Worse would be that for some rea

Re: [Wormux-dev] Profiling Wormux

2010-09-06 Par sujet Mikko Vartiainen
On Mon, Sep 6, 2010 at 11:59 AM, Kurosu wrote: > Hi, > > > - Mikko Vartiainen a écrit : >> I made more refined test. Here we simply stop animation if character >> is not visible. It makes a huge difference when there is lot a >> characters. > > The patch by itself seems fine, except that appl

Re: [Wormux-dev] Profiling Wormux

2010-09-06 Par sujet Kurosu
Hi, - Mikko Vartiainen a écrit : > I made more refined test. Here we simply stop animation if character > is not visible. It makes a huge difference when there is lot a > characters. The patch by itself seems fine, except that applying movements are /probably/ needed for the game to update

Re: [Wormux-dev] Profiling Wormux

2010-09-06 Par sujet Kurosu
- Mikko Vartiainen a écrit : > 54560     8.8264  wormux > PhysicalObj::CollidedObjectXY(Vector2 const&) const I'm wondering if this isn't AI computing its trajectories. This made me think about this algorithm for AI: 1) Estimate each strategy damage from its explosion, but do not estimate

Re: [Wormux-dev] Profiling Wormux

2010-09-06 Par sujet Kurosu
Hi, - RCL a écrit : > It looks like the game is doing type conversions too often. > > This particular function (__aeabi_f2ulz) converts floats to unsigned long. > (see here for complete list > http://infocenter.arm.com/help/topic/com.arm.doc.ihi0043a/IHI0043A_rtabi.pdf) That's what a google

Re: [Wormux-dev] Profiling Wormux

2010-09-06 Par sujet RCL
Hi, On Sun, Sep 5, 2010 at 10:17 PM, Mikko Vartiainen wrote: > 65309    10.5653  libgcc_s.so.1            __aeabi_f2ulz It looks like the game is doing type conversions too often. This particular function (__aeabi_f2ulz) converts floats to unsigned long. (see here for complete list http://infoc

Re: [Wormux-dev] Profiling Wormux

2010-09-05 Par sujet Mikko Vartiainen
On Sun, Sep 5, 2010 at 11:17 PM, Mikko Vartiainen wrote: > Here is new profile with libgcc debug symbols. This was all computer > 4x10 game with the patch from > https://mail.gna.org/public/wormux-dev/2010-09/msg00013.html Here is graphical call graph http://img266.imageshack.us/img266/8382/callg

Re: [Wormux-dev] Profiling Wormux

2010-09-05 Par sujet Mikko Vartiainen
On Sun, Sep 5, 2010 at 7:31 PM, Mikko Vartiainen wrote: > On Sun, Sep 5, 2010 at 9:15 PM, Kurosu wrote: >> Top callers are: >> 95053    20.8283  libgcc_s.so.1            /lib/libgcc_s.so.1 >> 75516    16.5473  libSDL-1.2.so.0.11.1     BlitNtoNPixelAlpha >> 41306     9.0511  libc-2.5.so          

Re: [Wormux-dev] Profiling Wormux

2010-09-05 Par sujet Mikko Vartiainen
On Sun, Sep 5, 2010 at 7:31 PM, Mikko Vartiainen wrote: > Animation seems to be the big obstacle on 4x10 case. I made crude test > (see below) with animations, and this alone changes completely > unplayable game to about 10 fps game. I made more refined test. Here we simply stop animation if char

Re: [Wormux-dev] Profiling Wormux

2010-09-05 Par sujet Mikko Vartiainen
On Sun, Sep 5, 2010 at 9:15 PM, Kurosu wrote: > Top callers are: > 95053    20.8283  libgcc_s.so.1            /lib/libgcc_s.so.1 > 75516    16.5473  libSDL-1.2.so.0.11.1     BlitNtoNPixelAlpha > 41306     9.0511  libc-2.5.so              /lib/libc-2.5.so > > I'm a bit surprised by first one, as I'

Re: [Wormux-dev] Profiling Wormux

2010-09-05 Par sujet Kurosu
Hi, sorry for the offlist reply, I didn't notice you provided onlist a opreport log, which I'm more used to deal with. Le 05/09/2010 16:33, Mikko Vartiainen a écrit : > Attached is oprofile report from Nokia N900 (600 MHz ARM Cortex-A8). > Wormux was compiled with -mcpu=cortex-a8 -mfpu=neon > -

Re: [Wormux-dev] Profiling Wormux

2010-09-05 Par sujet Mikko Vartiainen
Here is another case with 4x10 teams (1 Human) for comparison. Game wasn't really playable because screen updates were quite random and computer wasn't able to make a single shot (or at least I didn't see one) because it run out of thinking time. Counted GPTIMER_CYCLES events (32KiHz timer clock c