pypy instead of python...

22 views
Skip to first unread message

Paul Barnett

unread,
Apr 5, 2016, 10:41:05 AM4/5/16
to LightShow Pi Developers
I thought I'd pass this along to anyone that uses Python in another context, and needs better performance:


I tried pypy on a financial model I wrote in Python.  It normally runs about 5 minutes on my MacBook Pro, but with pypy, it reduced CPU time by 60% -- to about 2 minutes.  The results were exactly the same.

Most packages work fine, although numpy is an exception.  You need to install the pypy version:  http://pypy.org/download.html#installing-numpy

Although pypy is included on the RPi distribution (in Jessie and Wheezy), you can't currently use it for Lightshow Pi, due to at least one missing package.

The audioop module hasn't been ported/completed, at least not for the distributions I cited.   A quick search indicates that it has been done recently, but apparently hasn't yet made it to the RPi distribution.  Of course, there may be other things missing.



Tom Enos

unread,
Apr 5, 2016, 3:35:16 PM4/5/16
to LightShow Pi Developers
I'll try it tonight. 

Tom Enos

unread,
Apr 5, 2016, 9:36:38 PM4/5/16
to LightShow Pi Developers
audioop works if you install pypy from the binary packages on their download page, but rpi-audio-levels will not compile and from the docs pypy-numpy is most likely slower then Cpython-numpy. So this is a no go for lightshowpi. 


On Tuesday, April 5, 2016 at 7:41:05 AM UTC-7, Paul Barnett wrote:
Reply all
Reply to author
Forward
0 new messages