Page 1 of 1

64-bit Builds and Mac Performance Issues

Posted: Wed Dec 04, 2013 3:42 am
by Exploding Rabbit
Chipmunk works fine when built for both Mac and PC in 32-bit mode, but when I try to do a 64-bit build for either of them, I get an error. Here is the error I get for Mac when trying to build the Pachinko Scene:

Code: Select all

DllNotFoundException: /Games/Test/Builds/PachinkoChipmunk.app/Contents/Plugins/Chipmunk.bundle/Contents/MacOS/Chipmunk
  at (wrapper managed-to-native) ChipmunkBinding:ChipmunkRegisterInternalCalls ()
  at ChipmunkBinding..cctor () [0x00000] in <filename unknown>:0 
Rethrow as TypeInitializationException: An exception was thrown by the type initializer for ChipmunkBinding
  at ChipmunkBoxShape.Awake () [0x00000] in <filename unknown>:0 
We also tested performance for the Pachinko scene on Mac and Windows using PhysX, Box2D, and Chipmunk.

On Windows, Chipmunk is about 25 to 30% faster than Box2D, and about 30 to 40% faster than PhysX. :)

On Mac, Chipmunk is about 50% slower than Box2D, and it's about 40% slower than PhysX. :(

Can something be done about the speed problems on Mac? The tests were done on OS X Mavericks.

Thanks!

Edit: We also tested on OUYA, and performance was slightly worse than PhysX.

Re: 64-bit Builds and Mac Performance Issues

Posted: Wed Dec 18, 2013 4:10 pm
by slembcke
I'm rarely a Windows user. Now that I'm checking, I have a 32 bit Windows 7 install and a 32 bit version of Visual Studio 2010. It might take me a while to get everything upgraded if you need Windows 64 bit support.

Looks like 64 bit Mac builds were added about the same time as we were finishing Chipmunk2D for Unity. This should be fixable with a simple build script change though. A 32 bit build is a little odd on Mac, but completely fine. They even still accept them into the App Store AFAIK.

Not really certain about the Mac performance. I suspect I might have accidentally released a debug build, but I'll need to set up a fresh project to test that on. I'll have to get back to you on that.

Re: 64-bit Builds and Mac Performance Issues

Posted: Wed Dec 18, 2013 5:22 pm
by Exploding Rabbit
If you have time, please look into the Android performance as well. I did a test on a Nexus 7 (2013), and the performance for chipmunk on the pachinko scene is about 35% to 45% worse than Physx. We also had slower performance on OUYA. I wonder why on some platforms chipmunk is faster than Physx, and on others it is slower.

Here's a summary of our findings ordered by speed:

Windows: Chipmunk is 30-40% faster than Physx.
iOS: Chipmunk is 20% faster than Physx (iPhone 4).
Mac: Chipmunk is 40-45% slower than Physx (2012 Macbook Pro, Mavericks)
Android: Chipmunk is 30-45% slower than Physx (OUYA and Nexus 7 2013).

Our game is also supposed to come out on Linux, so when you add support for that we'll test that as well.