How to shoot yourself in the foot with Cython

If you've grown fat and complacent using Python, try a little Cython. It'll put hair on your chest and take some off your scalp. Take the following Cython code I was writing (heavily paraphrased) This code compiles file. It even runs fine for a few test cases I set up for it. But when I …

Advertisements

Get more out of Cython

Getting more out of your Cython code doesn't have to be a black art. A key step is to peek into the cythonized .c file and note if inner loops are getting down to bare C without any of the overheads associated with Python's dynamism. In an earlier post I had introduced Cython, which is …