Hacker News new | comments | show | ask | jobs | submit login

Here's a relevant article that convinced me how awesome Cython is:

http://www.perrygeo.net/wordpress/?p=116

Basically, if you are doing any work that requires heavy numerical processing, Cython is the way to go. On the other hand, I was playing with it to do some basic text processing and the improvements were negligible.




Don't forget numpy. I managed to get his code from 2 seconds to 0.2 seconds by a simple 60 second rewrite using numpy and arrays.


Even for numerical processing, it depends on where/how you write your loops. numpy just offers bindings to optimised C libraries and loops using map(..,..) should be much faster than using for.

As far as text processing is concerned, it seems like the python code is just a nice interface to the underlying compiled library and hence there isn't much difference.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: