Listen to the podcast
Bootstrap yourself in and prepare for episode 6! This week we discuss the Cython project and some of the impressive things you can do with this ever-more essential language. The skinny is that code written in Cython can be compiled to C, which in turn can be compiled by your favorite C compiler. Cython’s syntax is very similar to Python, but gives you the full power of C and the CPython interpreter. Oh, and you can use it for C++ and Fortran as well!
Welcome to a brave new world.
Today’s cyborgs include:
- Chris Colbert (special guest)
- Jason McCampbell
- Anthony Scopatz (moderator)
- Kurt Smith
This week Chris Colbert joins us from Enthought where he is a scientific software developer with a background in mechanical engineering, robotics, and computer vision. He feels that Python + Cython provides one of the most formidable computing platforms available today; striking a superb balance between performance, library support, and developer productivity.
Additionally, this episode marks the point were all of our regular panelists have now been on the show at least once!
Intro/Outro Music: ‘Sultans of Swing’ -Dire Straits
Show Links:
- Cython (http://cython.org/)
- NumPy & SciPy for .NET (http://www.johndcook.com/blog/2010/07/01/scipy-and-numpy-for-net/)
- FWrap (http://fortrancython.wordpress.com/)
- PyPy Benchmarks (http://speed.pypy.org/)
Chris Lasher
2011/04/10
I’m glad Kurt mentioned the Python graph library NetworkX. I have the same experiences with the library as he discussed: largely beautiful, very Pythonic, but poor performance for even mid-sized graphs. He mentioned Cython gave him a speed boost, but did not solve the memory issue, which boiled down to simply running up against Python’s dictionary implementation. I would love to know how he finally got around the problem. Also, I would love to know what he did to get the CPU speedups with Cython, including how large a speedup he saw, and his thoughts on proposing re-implementation of the fundamental graph structures of NetworkX.
Also, I’m wondering if Kurt looked at iGraph and its Python bindings, and what he thinks of that graph library. I decided to stick with NetworkX because of the pain in accessing nodes by their integer value, rather than just as arbitrary Python objects. I also found it had a high learning curve, being far less Pythonic than NetworkX.
Thanks for another informative podcast!