High Performance Python 1 from PyCon 2012 (slides, video, src)

This is the follow-on for my PyCon 2012 notes from the end post. I gave a 3.5 hour tutorial on High Performance Python 1, below I link to the slides, the video and the source code.

UPDATE2 From October 2014 I’ll be training on High Performance Python and Data Science in London using Python – sign-up here to get on our announce list (no spam, it’ll just be occasional announces).

UPDATE I’m thinking of writing an updated guide (update High Performance Python published by O’Reilly now!), if you’re interested in hearing about it please join the High Performance Python Mailing List (I’ve only got a list right now). I’ll make an announce once I know more.

Topics covered:

  1. Profiling with cProfile and line_profiler
  2. Profile visualisations with runsnake
  3. PyPy for quick wins
  4. Cython for C-level speed
  5. ShedSkin for ‘quick wins’ on the right problems
  6. Cython+numpy for multi-core (300* on this Mandelbrot problem) speed-ups
  7. Multiprocessing for multi-core support
  8. ParallelPython for multi-machine support
  9. Numexpr for faster numpy math

The other topics in this high performance track (a part of the tutorial track) are:

and there’s a full set of videos here.

After EuroPython I wrote up my talk with additional material as a 55 page book, I was hoping to update the book this year but things are moving so fast with our new StrongSteam AI/vision startup (presented at StartupRow at PyCon) that I can’t really justify the time right now. I’ll just link to the High Performance Python book from last year, the timings are out of date (but they’re correct in the slides below) and the src is updated a bit, but the method and discussion is still correct.

Github code for HighPerformancePython_PyCon2012.



Video (3.5 hours) via pyvideo.org:


Ian is a Chief Interim Data Scientist via his Mor Consulting. Sign-up for Data Science tutorials in London and to hear about his data science thoughts and jobs. He lives in London, is walked by his high energy Springer Spaniel and is a consumer of fine coffees.


  • I have some code for passing numpy arrays declared in Python through Cython to C and back if you're interested. I lifted the base code from (an attributed) mailing list posting.
  • Kostas
    Nice one! Next time add some material for nuitka too! http://nuitka.net/pages/overview.html