Skip to main content

PyCon: Why PyPy by Example

See the website.

PyPy is a fast, open source Python VM.

It's a 9 year old project.

PyPy is not a silver bullet.

For speed comparisons, see speed.pypy.org.

PyPy is X times faster than cPython. If it's not faster than cPython, it's a bug.

Hard code number crunching in a loop is much, much faster in PyPy.

(When I think about PyPy, V8, and all the various versions of Ruby, it makes me think that it's an amazing time for VMs!)

If you think of the history of software engineering, GC was hard to get right, but now it's mostly done. Now we talk about how to use multiple cores. It's a mess with locks, semaphores, events, etc. However, one day, using multiple cores will be something that is somewhat automatic like GC is.

He said nice things about transactional memory. It promises to give multicore usage. It has hard integration issues just like GC did. His solution is to run everything in transactional memory. I.e. let the decision about when to use transactional memory be pushed down into the underlying system.

He's using PyPy to implement STM (software transactional memory).

Concerning PyPy, "The code base might be hairy, but we are friendly."

They used TDD to write PyPy.

They spent 8 years building infrastructure.

ctypes works in PyPy.

PyPy operates from the level of bytecode down.

"Do you have to look like a Haskell programmer to work on STM?"

Haskell's STM is very manual. PyPy's is automatic.

"IRC is better than documentation."

I think this is the year of PyPy ;)

Comments