Porting Cython code to PyPy (using cpyext)

203 views
Skip to first unread message

Stefan Behnel

unread,
May 12, 2012, 7:03:47 AM5/12/12
to Cython-users
Hi,

I've written up a short summary of the important things to know when
porting Cython code to PyPy with the upcoming PyPy/cpyext support in Cython
0.17.

https://sage.math.washington.edu:8091/hudson/job/cython-docs/doclinks/1/src/tutorial/pypy.html

Here is the page source, so that you can add improvements yourself:

https://github.com/cython/cython/blob/master/docs/src/tutorial/pypy.rst

Please give it a read if you are interested and ask back if anything is
unclear or merits some more explanation.

Stefan

Gayathri Jayaraman

unread,
Apr 15, 2014, 3:16:27 AM4/15/14
to cython...@googlegroups.com, stef...@behnel.de
hi
The links are not working....

I have cython code and have implemented the dot function (the bottleneck) in cython. But am not able to get sufficient speed ups. So thought will port the cython to pypy for more speedups? u have alternate links

Yury V. Zaytsev

unread,
Apr 15, 2014, 9:40:53 AM4/15/14
to cython...@googlegroups.com
On Tue, 2014-04-15 at 00:16 -0700, Gayathri Jayaraman wrote:
>
> I have cython code and have implemented the dot function (the
> bottleneck) in cython. But am not able to get sufficient speed ups. So
> thought will port the cython to pypy for more speedups?

I doubt so; the binary extensions generated via Cython will run under
PyPy at the same speed as under CPython or slower.

If you want to take advantage of PyPy's JIT, run your Python
implementation of 'dot' (whatever it is) under PyPy and look into how
you can make it more JIT-friendly.

> u have alternate links

https://github.com/cython/cython/blob/master/docs/src/userguide/pypy.rst

--
Sincerely yours,
Yury V. Zaytsev


Reply all
Reply to author
Forward
0 new messages