[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] C/C++ and Python





On Tue, Apr 21, 2009 at 4:20 PM, Knapp <magick.crow@xxxxxxxxx> wrote:

Have you seen this?
http://arstechnica.com/open-source/news/2009/03/google-launches-project-to-boost-python-performance-by-5x.ars

yes, that's a nice goal.  I hope it does well!

 

Also this makes the python speed point very well. One last thing I
would add is that code speed is often not needed anymore. I have never
in the last 10 years had to worry about code speed while writing a
simple 2d game like pong, tetrus, defender, donky kong or anything
else like that.

Yeah, most of the time you don't need it.  But when you do, some problems become impossible to solve within a given time, so in those rare cases it's good to have ways available to you.

 


http://www.scipy.org/PerformancePython


That link is interesting for the comparison down the bottom.  One other comparison that could be added is a C version available in a library... which pygame does include a C version in pygame.transform.laplacian.  It's not the same code, because it works on surfaces, not general matricies but pretty close.
 
It's also interesting as laplace is also a commonly used benchmark for GPGPU processing.  You can use a version written in python using pygpu or pycuda which looks almost identical to the numpy version... and get a 100x speed boost.

The performance related thing is that there is a gsoc project this year to make SSE/mmx speedups to numpy at runtime.