PyPy 2.1 beta released

Back in May, we mentioned that we’d been sponsoring the development of the ARM port of PyPy, the high-performance Python interpreter. Earlier today the team released a first beta of the upcoming 2.1 release, which for the first time adds ARM as an officially supported architecture.

You can see the announcement here, and download binaries for Raspbian here. Give it a spin and let us know what you think.

15 comments

Avatar

Sounds nice. I’ll wait ’till it is part of the package roll out though. I just don’t use python enough to need it yet.

Avatar

Any test results for its performance on the Raspberry PI?

Also, is it compatible with pygame and tkinter?

Avatar

Well, I tried to run PyDance with PyPy.
Unfortunately I got the “module pygame not found” error.

Avatar

found this one..ran it and pypy was much faster! at least in this area..

https://gist.github.com/evan2m/2706238

http://evanmuehlhausen.com/simple-counters-in-python-with-benchmarks/

big difference .. he is doing some interesting things with dictionaries .
pi@raspicntl ~/Desktop/pypy-2.1-beta-linux-armhf-raspbian/bin $ pypy benchmark.py
defaultdict letters: 41.7537050247
defaultdict words: 16.5675930977
setdefault letters: 48.5591549873
setdefault words: 18.4995830059
Counter letters: 40.9253668785
Counter words: 16.9336678982
26727 letters and 6691 words
pi@raspicntl ~/Desktop/pypy-2.1-beta-linux-armhf-raspbian/bin $

then under IDE 2.7.3

python 2.7.3 (default, Jan 13 2013, 11:20:46)
[GCC 4.6.3] on linux2
Type “copyright”, “credits” or “license()” for more information.
>>> ================================ RESTART ================================
>>>
defaultdict letters: 107.973585844
defaultdict words: 47.9135489464
setdefault letters: 255.630005121
setdefault words: 69.2737569809
Counter letters: 327.111450911
Counter words: 89.4350750446
26727 letters and 6691 words
>>>

Avatar

Ran my quadcopter code through it, as a speed increase would be great. Unfortunately smbus (required for i2c to the sensors) isn’t supported:

pi@protopi ~/Downloads $ sudo pypy ./drone.py
Traceback (most recent call last):
File “app_main.py”, line 72, in run_toplevel
File “./drone.py”, line 12, in
import smbus
ImportError: No module named smbus

Avatar

P.S. Should have said “smbus is not supported YET”. Can’t wait for the point it is!

Avatar

Very nice….

Just curious: what is the difference (visible and none visible) between PyPy and Python’s IDE?

Thanks

The Raspberry Pi Guy

eben

In a nutshell, PyPy has a JIT compiler, so it attempts to translate sections of your Python program into machine code rather than interpreting it.

Avatar

what a beastlty awful name

.. should be Py Squared
or somethin’

Avatar

In French you read it “pipi”, which means “pee” in English :).

Avatar

Can I use “ARM Softfloat Linux binary (ARMEL/gnueabi, tar.bz2, Ubuntu Precise)” version for softfloat debian?

Avatar

The announcement Eben linked to says “…anything with ARMv6 (like the Raspberry Pi)…” and “armel builds are built using the gcc-arm-linux-gnuebi toolchain provided by Ubuntu and currently target ARMv7.”

So the answer is no.

Avatar

I tried PyPy, unfortunately the Pi’s CPU is very weak.

I am really looking forward to a newer, more powerful revision of the raspberry with a powerful multicore MIPS64 or ARM A9 or higher CPU.

However, it doesn’t look like there is a lot of hardware development going on when reading the blog here at raspberrypi.org.

Guys and girls – almost a year has passed – this is almost an age for modern electronics. Do us a favor and get RPi 2.0 ready ;)

Avatar

I think you misunderstand the purpose of the pi. It is for education. Any further uses: Bonus!

a more powerful version would be more expensive and would prevent its education end goal being forfilled as fast.

Avatar

I’ve read in several interviews that Eben wants to keep the Pi hardware standardised, so that the software platform is stable (like what has happened with the Arduino).
If you want more powerful hardware, there are plenty of other boards (e.g. Beaglebone).

Leave a Comment

Comments are closed