30x perfomance difference between PyBullet and Bullet3

Post Reply
Mark97
Posts: 25
Joined: Sun Sep 26, 2021 12:38 pm

30x perfomance difference between PyBullet and Bullet3

Post by Mark97 »

I've just ran the benchmark of 3000 cubes in Bullet3 (using Visual Studio), and found a total step time of about 7 ms. (4 threads)
I've copied the C++ code and translated it into Python code, and ran 3000 standard cubes in PyBullet (using Anaconda Navigator, Notebook), and found a total step time of about 200 ms. (single thread probably)

That is a performance difference of about 30x. That is a big difference. Therefore I would like to check if others have found the same performance difference, or if PyBullet can be sped up in any way.
User avatar
KKlouzal
Posts: 65
Joined: Thu Mar 06, 2014 5:56 am
Location: USA - Arizona

Re: 30x perfomance difference between PyBullet and Bullet3

Post by KKlouzal »

While I wont say it isn't possible to speed up computation of PyBullet, I will say it should be expected that it underperforms compared to Bullet3. Python is an abstraction layer atop C/C++ so there will be overhead.
Post Reply