[ODE] dSetZero

Joakim Eriksson jme at snowcode.com
Mon Sep 8 06:32:01 2003


I have also done some profiling while speed comparing my own 
iterative physics engine against ode and noticed the same thing.
However if you have a good compiler there wont be any speed diffrence
at all if you use a memset or not. I use VS 2003 and he uses the
exact same code using both the while and a memset.

But it's still a huge performance loss. For small simulations (Under 4
bodies or so) the dSetZero takes about 40-50% of the cpu. For
larger like in my test case 15 bodies attached using 15 hinge
constraints it takes 25% of the cpu. The larges time is spend
while zeroing the large A matrix in my test case. However that
one should be filled with a lot of zeros. Not sure if the LCP solver
actually uses the zeros. So as you say, thats something someone
that knows the inner workings of the engine could take a look at.

/Joakim E.

> -----Original Message-----
> From: Jan [mailto:jan@rpgfan.demon.co.uk]
> Sent: den 8 september 2003 14:42
> To: ode@q12.org
> Subject: [ODE] dSetZero
> 
> 
> I was just profiling ODE to see if it could be speeded up, 
> and it turns out
> it spends more time in dSetZero than anywhere else in my entire game!
> 
> Now it could be speeded up by calling memset instead, but it 
> seems a lot of
> these calls are superfluous (some having comments saying 
> 'hmmm, this info
> gets overwritten straight away anyway, so why bother?')
> I could go through and remove them all by simple 
> trial-and-error, but it
> seems to me like someone who knows how ODE works 'on the 
> inside' could do it
> a lot faster and we'd all end up with quicker physics, rather 
> than just me!
> --
> Jan
> _______________________________________________
> ODE mailing list
> ODE@q12.org
> http://q12.org/mailman/listinfo/ode
>