Profiling your code seems like something you should do. Unfortunately, it’s not something that always feels easy to do. This talk aims to give you the tools to improve the speed and memory efficiency of your applications, while minimising the productivity burden of adding new steps to your workflow.
Most of the time will be spent looking at working with the profile and pstats modules within Python’s standard library. There will be a small focus on showing off some of the features of the pstats.Stats class. We will move from using these tools as one-shot print outs, to being able to use them over time to track performance.
Throughout the talk, we’ll spend some time peeking at source code from projects that are out in the wild. Looking through other people’s code will give us a great indication about how people are actually using the tools, rather than just what the documentation says.
The overarching goal of the talk will be to make profiling a practical part of your programming life. If nothing else, you’ll be able to quantify the gains that your coding as, by pointing to lower overheads due to your super efficient new code!
Tim McNamara taught himself Python to save the world. He has been heavily involved with the Sahana Disaster Management System and the One Laptop Per Child projects. He is currently in charge of communications and outreach at the New Zealand eScience Infrastructure, bringing supercomputing power to New Zealand's scientists.