[pypy-dev] pypy 2.2.1 performance on Raspian

Eric Driggers admalledd at gmail.com
Wed Jul 1 18:15:49 CEST 2015


Unless I am missunderstanding, isn't pypy 2.2.1 rather old? Have you
tried a more up-to-date version first? (I seem to see current stable
is 2.6.0 and nightly is 2.7.0-alpha0) My memory is that between 2.3
and 2.4 there was some armhf work done, and that between 2.3 and 2.5 a
whole pile of stuff was done that improved pypy -> C (mostly to help
cffi, but helped CAPI and ctypes a bit too IIRC)

It is still probably a good idea to see about using cffi (and you can
use cffi on cpython as well!) but low hanging fruit and all that :D

On Wed, Jul 1, 2015 at 8:38 AM, Andy Baker <andy at pistuffing.co.uk> wrote:
> Hi Armin,
>
> Thanks for the insight.  I'll have a look in more detail to port the 'C'
> modules away from the CPython C API to CFFI.  The performance tests I was
> doing were about 10000 loops of reading sensors (the Cpython C API
> libraries) along with 1000 loops of arithmatic / trigonometry processing the
> sensor data.  I guess the "only 2.5 times slower" is the balance between the
> improved math(s) performance and the reduced sensor performance.
>
> Thanks,
>
> Andy
>
> -----Original Message-----
> From: armin.rigo at gmail.com [mailto:armin.rigo at gmail.com] On Behalf Of Armin
> Rigo
> Sent: 01 July 2015 15:33
> To: Andy Baker
> Cc: Cory Benfield; PyPy Developer Mailing List
> Subject: Re: [pypy-dev] pypy 2.2.1 performance on Raspian
>
> Hi Andy,
>
> Using the CPython C API is very slow on PyPy.  If your program is mostly
> spending its time issuing calls via the CPython C API, then getting "only"
> 2.5x slower is already good :-/  CFFI is much, much faster on PyPy.  If you
> don't want to rewrite your CPython C API modules (even though you said they
> are very thin layer, which means it shouldn't be much work), then you're
> better off with CPython.
>
> Additionally, make sure to read
> http://pypy.readthedocs.org/en/latest/faq.html#how-fast-is-pypy and to
> multiply the time estimates given there by 5 or 10: Raspberry Pi is much
> slower than desktop PCs.
>
>
> A bientôt,
>
> Armin.
>
> _______________________________________________
> 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