physic engines speed tests

Jeremy Fitzhardinge jeremy at goop.org
Tue Mar 18 12:25:16 EDT 2008


Chris Hager wrote:
> Hey all,
>
> Josh and I now made some speed tests with both 2D physics engines - 
> Box2D and Chipmunk - and here are some results. One warning though: The 
> tests were made with Python, and for Box2D there's a library compiled 
> with swig, whereas Chipmunk's interface is done with ctypes. This may 
> change the results to Box2D's advantage, but is justifiable as our 
> interest right now is which performs better with Python and on the xo 
> laptop.
>
> In the end, Box2D performs quite a bit better than Chipmunk, although it 
> has a ways larger library and many more functions. On a XO Laptop (build 
> 650), the Box2D engine can easily handle 50 elements - almost twice what 
> we got from Chipmunk.
>   

Have you done any profiling to see where the time is going?  I did some 
investigation about how hard it would be to make Chipmunk use 3dnow to 
get some vectorization; I came to the conclusion that it was definitely 
possible if it helps any of the hotspots.  But I haven't measured to see 
where the time is going.

But as you suggest, my suspicion is that a lot of the time is being lost 
in the python binding, and a higher-level interface would allow it to 
perform better.

How do the physics models themselves compare?

    J



More information about the Devel mailing list