[pypy-dev] could it be that cpyext is faster than python + cffi?

Phyo Arkar phyo.arkarlwin at gmail.com
Fri Feb 13 15:33:00 CET 2015


Very interesting.
If that really working it will be game changer.
Can it build Scipy, scikit-learn, matplotlib now?
Pandas already working i think.

On Fri, Feb 13, 2015 at 8:16 PM, Matti Picus <matti.picus at gmail.com> wrote:
> I am close to releasing a blog post about numpy.linalg
>
> https://gist.github.com/mattip/25680e68fe7e2856fe0c
>
> Note the benchmark section, this is not a typo. Here's how I got to the
> conclusion that cpyext is faster than python+cffi.
>
> I installed numpy from the pypy/numpy repo on a nightly after 2.5.0
>
> pip install git+https://bitbucket.org/pypy/numpy.git
>
> I then benchmarked the two pypy methods of calling numpy.linalg.inv() via
> this script which simply calls linalg.inv() for different sized ndarray.
>
> https://gist.github.com/mattip/a7b22dc237fb09a46758
>
> $pypy inverse.py 10
> UserWarning: npy_clear_floatstatus, npy_set_floatstatus_invalid not found
>   warn('npy_clear_floatstatus, npy_set_floatstatus_invalid not found')
> after   999999, for n= 10, time=20.64,     20.64 msec/1000 loops
>
> and
>
> $USE_CPYEXT=yes pypy inverse.py 10
> after   999999, for n= 10, time= 8.52,      8.52 msec/1000 loops
>
> Any thoughts? Comments on the blog post?
> Matti
>
> _______________________________________________
> pypy-dev mailing list
> pypy-dev at python.org
> https://mail.python.org/mailman/listinfo/pypy-dev


More information about the pypy-dev mailing list