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.r...@gmail.com [mailto:armin.r...@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@python.org
https://mail.python.org/mailman/listinfo/pypy-dev

Reply via email to