[ODE] More speed???

Nguyen Binh ngbinh at glassegg.com
Wed Nov 5 10:29:07 MST 2003


Hi Martin,

MCM> Such as?
     Below points...

MCM> That's surprising, since they're different time complexities.
     Yes! You mean O(n*n) and O(n*log(n))???
MCM>   What's the size of your islands?  How many bodies are you using?
MCM>  Did you use some of the stepfast tests for comparisons, the ones
MCM> with hundreds of bodies?

     Yes, my test scene has about 200 bodies (sphere, box, cylinder)
     and I "feel" that original Step is not too slow compare to
     StepFast.(Not try to profile yet so I don't have any stats here)

MCM> What exactly is surprising?  That it takes a long time to solve a big
MCM> set of linear equations?
     Yes! It takes almost a half of CPU power to solve that linear
     problem. That surprises me.

>>            -These two function can be SIMDize
>>             easily. I have not tried it yet but I'd bet it will make
>>             original Step() much faster.

MCM> Definitely!  Russ has suggested this a couple times.
                I'm a half way doing this. :)

>>            - Or we can solve them using "iterative" method
MCM> That's what Stepfast does, as you point out below.
     Actually, no. StepFast use "iterative" method to interate all
     joints but not use "iterative" method to solve linear problem.
     I've read that the best (efficient and easy to implement) way to
     solve linear problem A.x = b when A is PSD is using interative
     method "Conjugate Gradient". I'm thinking about it now.
     I don't know which way is better? SIMDize original linear problem
     routine(Gauus Seidel or Jacobi???) or rewrite it. And actually, I
     also don't know is there any Physics SDK use Conjugate
     Gradient???
     You can read about iterative methods here
     ftp://ftp.netlib.org/templates/templates.ps
     
>>    b) Stepfast code path:
>>       ... one way to optimize is using specialized LCP for small matrix

MCM> How exactly would you specialize it for a 6x6 matrix?  For 2x2 or 3x3 
MCM> you could write out a single formula, which would save the 
MCM> storage/retreval of a few intermediate values.  But I doubt that would 
MCM> save you much with 6x6, and would just complicate the code, and might 
MCM> blow the instruction cache for example.  What did you have in mind here? 
MCM>   Just unrolling loops?

       We need more experiments here.I didn't try this path yet but I
       have an impression that when using StepFast, we need to solve
       linear problem A.x = b (A is nxn) with 2<= n <=6. Am I wrong?
       And with my test scene of 200 primitive bodies, I observed that
       in most case n is 2.So I have an idea to write specialized
       routine for StepFast. Actually, using LCP things of original
       Step for StepFast is not good as the data input is hugely
       diferrent.

MCM> Best,
MCM> Martin

-- 
Best regards,

---------------------------------------------------------------------
   Nguyen Binh
   Software Engineer
   Glass Egg Digital Media
   
   E.Town Building  
   7th Floor, 364 CongHoa Street
   Tan Binh District,
   HoChiMinh City,
   VietNam,

   Phone : +84 8 8109018
   Fax   : +84 8 8109013

     www.glassegg.com
---------------------------------------------------------------------



More information about the ODE mailing list