18 March 2012 - 4:00High 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.
UPDATE I’m thinking of writing an updated guide (possibly as a self-published book), 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:
- Profiling with cProfile and line_profiler
- Profile visualisations with runsnake
- PyPy for quick wins
- Cython for C-level speed
- ShedSkin for ‘quick wins’ on the right problems
- Cython+numpy for multi-core (300* on this Mandelbrot problem) speed-ups
- Multiprocessing for multi-core support
- ParallelPython for multi-machine support
- Numexpr for faster numpy math
The other topics in this high performance track (a part of the tutorial track) are:
- Faster Python Programs through Optimization (video)
- How to get the most out of your PyPy (video)
- High Performance Python II (video)
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.
Slides:
Video (3.5 hours) via pyvideo.org:
Ian applies Data Science as an AI/Data Scientist for companies in Mor Consulting, founded the image and text annotation API Annotate.io, co-authored SocialTies, programs Python, authored The Screencasting Handbook, lives in London 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.
Nice one! Next time add some material for nuitka too!
http://nuitka.net/pages/overview.html