[pypy-dev] pypy 2.2.1 performance on Raspian

Maciej Fijalkowski fijall at gmail.com
Thu Jul 2 09:22:25 CEST 2015


for what is worth, you not gonna get better performance from C
extensions between PyPy 2.2 and 2.6

On Wed, Jul 1, 2015 at 6:55 PM, Andy Baker <andy at pistuffing.co.uk> wrote:
> Hi Eric,
>
> You're right - 2.2.1 is long-in-the-tooth but it's the version shipped in
> the Raspian distribution.  I'll see if I can get the RPIF to upgrade the
> distro to PyPy 2.6 and I'll give it a go myself too.
>
> Andy
>
> -----Original Message-----
> From: Eric Driggers [mailto:admalledd at gmail.com]
> Sent: 01 July 2015 17:16
> To: Andy Baker
> Cc: PyPy Developer Mailing List
> Subject: Re: [pypy-dev] pypy 2.2.1 performance on Raspian
>
> 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
>
> _______________________________________________
> 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