[Stackless] [C++-sig] [Boost] Trouble optimizing Boost.Python integration for game development (it seems too slow)
Simon Wittber
simonwittber at gmail.com
Wed Aug 26 13:40:23 CEST 2009
On Wed, Aug 26, 2009 at 5:31 PM, Dan Sanduleac<sanduleac.dan at gmail.com> wrote:
> The testing goes like this: each "tick", 10000 objects update their
> position, according to their velocity and timedelta since last "tick", and
> I'm measuring the average time a tick takes to complete.
I know that I'm not answering your question, but I thought I might
throw in some advice, if you have a need for speed.
It would be much faster to create an Vec3Array type object, and do the
loop iteration with the += operating inside C++. This would make your
Python API look something like:
positions = Vec3Array(10000)
velocities = Vec3Array(10000)
positions += velocities
Also, Stackless will have little effect your benchmarks, so you may
find more answers in a more general forum.
--
:: Simon Wittber
:: http://www.linkedin.com/in/simonwittber
:: phone: +61.4.0135.0685
:: jabber/msn: simonwittber at gmail.com
More information about the Stackless
mailing list