Get Lanyrd on your mobile (iPhone, Android and more) - check it out here

PyPy

A session at PyCon ZA 2012

The PyPy project has recently gathered a lot of attention for its progress in speeding up the Python language -- it is the fastest, most compatible and most stable 'alternative' Python interpreter. No longer merely a research curiosity, PyPy is now suitable for production use.

The speed comes from a custom Just-in-Time compiler (JIT). It is the first Virtual Machine to have a JIT generated automatically from the interpreter of the language, for a complicated language like Python. It makes it correct and complete by construction. The JIT itself is a tracing JIT, roughly similar to TraceMonkey.

  • most Python benchmarks run much faster than with CPython or Psyco
  • the real-world PyPy compiler toolchain itself (200 KLocs) runs twice as fast
  • supports x86 (32 or 64 bit), ARM (v7), and soon POWER64
  • full compatibility with CPython (more than Jython/IronPython)
  • ctypes, CFFI and C++ support to call C/C++ libraries from Python (fast)
  • supports Stackless Python (in-progress)
  • integrates existing CPython C extensions (slowly)

In this talk we will see examples of what PyPy is best at (pure Python code that runs for a while), what compatibility issues you may run into (very few), how to use CPython C extension modules (you can more or less, but it's slow), as well as dig a bit below the surface and use some tools to view the x86 machine code that was produced by the JIT.

I will end the talk with an overview of Software Transactional Memory (STM) and how it promizes to give a PyPy without the Global Interpreter Lock (GIL), i.e. able to run a single process using multiple cores.

About the speaker

This person is speaking at this event.
Armin Rigo

Coverage of this session

Sign in to add slides, notes or videos to this session

Tell your friends!

When

Time 11:00am11:45am SAST

Date Thu 4th October 2012

Short URL

lanyrd.com/syydy

Official event site

za.pycon.org

View the schedule

See something wrong?

Report an issue with this session