I have a project which runs is run in pypy (and already achieves a nice speedup over its python counterpart). However, I do have a Cython implementation of one function which is way faster than the pypy version. So I would like to include this function.
The problem is that pypy does not seem to find this module (even though the .so lies in the same folder as the executed .py script):
ImportError: No module named foo
Hence, does pypy support cython? Thanks.
If you want to make Cython extension available under PyPy, you have to recompile it and reinstall it under PyPy. I suggest using a virtualenv for that, to start with. However, if this is purely for speedups, I would really really discourage you from doing so. The CPyext (CPython C API emulation) is really slow and you're very likely ending up with a slowdown. On the other hand, optimized Python should run under PyPy as fast as optimized Cython (with types).
Cheers, fijal
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With