Saturday, April 30, 2011

PyPy 1.5 Released: Catching Up

We're pleased to announce the 1.5 release of PyPy. This release updates PyPy with the features of CPython 2.7.1, including the standard library. Thus all the features of CPython 2.6 and CPython 2.7 are now supported. It also contains additional performance improvements. You can download it here:

http://pypy.org/download.html

What is PyPy?

PyPy is a very compliant Python interpreter, almost a drop-in replacement for CPython 2.7.1. It's fast (pypy 1.5 and cpython 2.6.2 performance comparison) due to its integrated tracing JIT compiler.

This release includes the features of CPython 2.6 and 2.7. It also includes a large number of small improvements to the tracing JIT compiler. It supports Intel machines running Linux 32/64 or Mac OS X. Windows is beta (it roughly works but a lot of small issues have not been fixed so far). Windows 64 is not yet supported.

Numerous speed achievements are described on our blog. Normalized speed charts comparing pypy 1.5 and pypy 1.4 as well as pypy 1.5 and cpython 2.6.2 are available on our benchmark website. The speed improvement over 1.4 seems to be around 25% on average.

More highlights

  • The largest change in PyPy's tracing JIT is adding support for loop invariant code motion, which was mostly done by Håkan Ardö. This feature improves the performance of tight loops doing numerical calculations.
  • The CPython extension module API has been improved and now supports many more extensions. For information on which one are supported, please refer to our compatibility wiki.
  • These changes make it possible to support Tkinter and IDLE.
  • The cProfile profiler is now working with the JIT. However, it skews the performance in unstudied ways. Therefore it is not yet usable to analyze subtle performance problems (the same is true for CPython of course).
  • There is an external fork which includes an RPython version of the postgresql. However, there are no prebuilt binaries for this.
  • Our developer documentation was moved to Sphinx and cleaned up.
  • and many small things :-)

Cheers,

Carl Friedrich Bolz, Laura Creighton, Antonio Cuni, Maciej Fijalkowski, Amaury Forgeot d'Arc, Alex Gaynor, Armin Rigo and the PyPy team

20 comments:

kost BebiX said...

Cool. Blog design became blue :-)

Anonymous said...

Unless there is something Intel specific - maybe calling it x86/x86-64 might be a good idea since this suggests that pypy does not work on amd / via chips.

Anonymous said...

do you have plans to add CPython 2.7.1 to speed.pypy.org?

Anonymous said...

Is it just me or does cProfile seem rather broken (at least on Windows)? I get random subtimings that are negative or in the billions.

>>>> cProfile.run("[abs(1) for n in xrange(10**6)]")
1000002 function calls in 1.000 seconds

Ordered by: standard name

ncalls tottime percall cumtime percall filename:lineno(function)
1 -137.813 -137.813 1.000 1.000 :1()
1000000 138.813 0.000 138.813 0.000 {abs}
1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Prof
iler' objects}

Zooko said...

Where's the flattr button? I want to give you a euro tip again, just like I do every time you blog.

Also: way to go on releasing PyPy 1.5! This project is really growing up!

Armin Rigo said...

Anonymous: cProfile on Windows works for me. It might be details of your Windows version or whatever. Can you open it as a proper bug report? Thanks! https://codespeak.net/issue/pypy-dev/

anatoly techtonik said...

Awesome! Looking forward to PyPy on NaCl.

Antonio Cuni said...

@zooko: I don't know why the flattr button went away. I re-uploaded the template to blogger and now it seems to be there again, can you confirm?

etal said...

Great stuff. Do you think PyPy is ready to be re-packaged for Debian yet?

I'm looking at this:
http://bugs.debian.org/538858

I have a feeling the popcon would be quite a bit higher nowadays.

Gaëtan de Menten said...

Congratulations to the whole team. What's coming next now that this large milestone is completed?

Anonymous said...

Is it just me or does the download page still point to the 1.4.1 release?

Antonio Cuni said...

@Anonymous: what is the "download page" you are talking about? For me,
http://pypy.org/download.html

shows only links to PyPy 1.5. Maybe it's a browser cache issue?

Anonymous said...

This is insane.

I clicked on the link multiple times yesterday and today (after restarting firefox) and only now the page refreshed correctly.

Just shows you that anything can happen.

vak said...

btw, regarding https://bitbucket.org/pypy/compatibility/wiki/Home -- i am using pymongo driver under pypy without problems (not yet checked against the fresh pypy 1.5 though)

vak said...

minor thing -- version isn't updated?

Python 2.7.1 (b590cf6de419, Apr 30 2011, 02:00:34)
[PyPy 1.5.0-alpha0 with GCC 4.4.3] on linux2

Anonymous said...

Great news, 25% speedup over PyPy 1.4 is just another great step forward. I'm looking forward for times when Python will be fastest dynamic object-oriented language and it will be more and more popular. I feel that these times are very close thanks to PyPy.

What about adding PyPy to The Computer Language Benchmarks Game?

Damian Cugley said...

I have not yet managed to build C extensions on Mac OS X with distribute/distutils/whatever because sysconfig.get_config_var returns None. Is there a quick way to fix this?

Damian Cugley said...

@anonymous The Computer Language Benchmarks Game only permits one implementation per language, and CPython 3.2 is the implementation they use for Python.

Anonymous said...

Would it be easy to implement mutable builtin classes (for example for adding new methods to int or str) in pypy?

Thomas Heller said...

I'm speechless :-)

This is the first time I use pypy and it works out of the box even with my fancy Windows GUI toolkit (written completely in ctypes) out of the box.

Great work, guys!