|
|
Subscribe / Log in / New account

PyPy 1.4 released

Version 1.4 of the PyPy Python compiler is available. "This is a major breakthrough in our long journey, as PyPy 1.4 is the first PyPy release that can translate itself faster than CPython. Starting today, we are using PyPy more for our every-day development. So may you." LWN looked at PyPy last May.

to post comments

PyPy 1.4 released

Posted Nov 28, 2010 7:32 UTC (Sun) by Wummel (guest, #7591) [Link] (1 responses)

Pypy speed is compared against Python 2.6, yet it implements Python 2.5 compatibility. Shouldn't Pypy speed be compared to Python 2.5 in this case?

PyPy 1.4 released

Posted Nov 28, 2010 13:38 UTC (Sun) by armin.rigo (guest, #71511) [Link]

When comparing the performance, we use CPython 2.6 instead of 2.5 because it is nowadays the version of CPython most commonly installed. It is also a bit faster than CPython 2.5, so benchmarking against the older CPython 2.5 would be somehow cheating. Performance is unrelated to the set of Python features available; we are working on a PyPy with Python 2.7 compatibility, but this will not have any serious impact on the performance of PyPy.

PyPy in Debian

Posted Nov 28, 2010 12:26 UTC (Sun) by man_ls (guest, #15091) [Link] (6 responses)

Not packaged in debian yet, strange. Also there is no official installer; that makes it a bit hard to try it out.

Anyway I tried it. For my own package it was a bit slower than Python (1:44 vs 1:01), which is a pity: I do a lot of string manipulation, and it should be easy to speed up. On the other hand, a huge thumbs up on compatibility.

I think the package now needs wider exposure, so they should try to get it into distributions as a drop-in replacement for Python.

PyPy in Debian

Posted Nov 28, 2010 13:06 UTC (Sun) by Cyberax (✭ supporter ✭, #52523) [Link] (5 responses)

>I think the package now needs wider exposure, so they should try to get it into distributions as a drop-in replacement for Python.

There's no support for extensions in C which is used in quite a lot of libraries. So it can't be a drop-in replacement.

I tried to use it on my Pylons webapp, but there's no pure-Python PostgreSQL client for Python 2.6 (there is one for Python3).

PyPy in Debian

Posted Nov 28, 2010 13:18 UTC (Sun) by man_ls (guest, #15091) [Link] (1 responses)

Apparently Pypy devs are working on that too, although it seems to be slow in the coming (not released since 1.2). There shouldn't be a fundamental reason why extensions are not supported.

So it's a drop-in replacement for pure Python apps only. It could come handy in many environments. Another issue is that JIT support appears to be x86-only, so perhaps there is not a big improvement (or IME a minor loss of performance) on other platforms.

PyPy in Debian

Posted Nov 28, 2010 23:30 UTC (Sun) by weuhrqefrvehfbdav (guest, #71516) [Link]

PyPy has gained preliminary support for C extension modules in the 1.3 release, see here, here and here for details. They are trying to provide the complete C Python API, but most extensions usually need some adjustments to work with cpyext.

PyPy in Debian

Posted Nov 28, 2010 13:31 UTC (Sun) by HelloWorld (guest, #56129) [Link]

> There's no support for extensions in C which is used in quite a lot of libraries.
There will be though, see http://pypy.org/compat.html.

PyPy in Debian

Posted Nov 28, 2010 14:31 UTC (Sun) by foom (subscriber, #14868) [Link] (1 responses)

> I tried to use it on my Pylons webapp, but there's no pure-Python PostgreSQL client for Python 2.6 (there is one for Python3).

There are at least three of those for python 2.X:

pgasync: http://jamwt.com/pgasync/ (an async implementation for the Twisted mainloop, which might not work for your Django app)
bpgsql: http://barryp.org/software/bpgsql/
pg8000: http://pybrary.net/pg8000/

PyPy in Debian

Posted Nov 28, 2010 16:40 UTC (Sun) by Cyberax (✭ supporter ✭, #52523) [Link]

I've tried bpgsql and pgasync, neither of them works with Pylons and pgasync appears to be dead.

I'll try pg8000 - looks nice.

PyPy 1.4 released

Posted Nov 29, 2010 20:54 UTC (Mon) by Velmont (guest, #46433) [Link] (6 responses)

Soooooo... Let me get this straight.

Your scripts is running ontop of PyPy which is itself running on top of CPython. And this is faster because PyPy does optimizations?

PyPy 1.4 released

Posted Nov 29, 2010 21:40 UTC (Mon) by tseaver (guest, #1544) [Link] (5 responses)

CPython is not anywhere in the picture. PyPy is self-hosting at
this point. See http://en.wikipedia.org/wiki/PyPy .

PyPy 1.4 released

Posted Nov 29, 2010 21:48 UTC (Mon) by dlang (guest, #313) [Link] (4 responses)

it can't be python all the way down, at some point it needs to go to something else.

so are the speed improvements with pypy running on Cpython, running on Java, running on .NET, or producing C code that then gets compiled?

I would expect significant variations in the performance of these different options.

I'm disappointed to read that they abandoned the ability to run on javascript, as that would have made it easier to migrate python code from server-side to client-side.

PyPy 1.4 released

Posted Nov 29, 2010 23:42 UTC (Mon) by drag (guest, #31333) [Link] (1 responses)

With Pypy your using a python program to compile a python interpreter written in python. The resulting executable is pypy-c and that is what you use to run your programs.

Similar to how with GCC your using a C compiler to compile a C compiler written in C that is used to compile other C programs.

The point of it is that they can spend more time experimenting and working out optimizations then if they don't have to waste their time farting around with making C work.

PyPy 1.4 released

Posted Dec 2, 2010 17:02 UTC (Thu) by Velmont (guest, #46433) [Link]

Sooo... pypy compiles the compiler to machine code?

But, could it also compile my python programs then?

PyPy 1.4 released

Posted Nov 30, 2010 14:27 UTC (Tue) by kfiles (guest, #11628) [Link] (1 responses)

I'm disappointed to read that they abandoned the ability to run on javascript, as that would have made it easier to migrate python code from server-side to client-side.
For that, there's still pyjamas, right?

PyPy 1.4 released

Posted Nov 30, 2010 23:13 UTC (Tue) by rasjidw (guest, #15913) [Link]

The most promising project that will hopefully enable Python in the web-browser that I have found is emscripten. It uses LLVM to compile C-code to LLVM bitcode, and then compiles that to javascript. There is already a working Lua interpreter done using emscripten, and there is a demo of it here. Python 2.6 already compiles with emscripten, but there are some lower level system calls that still need to be worked out and emulated.

Unlike most other attempts at getting Python to run in the browser, this is not a new implementation of Python, but real CPython compiled to Javascript, so it should even be possible to get C-extensions working.

PyPy 1.4 released

Posted Dec 4, 2010 18:58 UTC (Sat) by ssam (guest, #46587) [Link]

can some of these speed-ups be brought back into cpython?


Copyright © 2010, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds