Overview
Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Discover common performance anti-patterns in Python and learn how to optimize your code for speed without sacrificing readability in this 30-minute PyCon US talk. Set up profilers to measure application performance, track improvements, and regressions. Explore specific examples of Python code refactoring, including looping variants, list comprehensions, and proper type usage. Gain insights into reading profiler results, understanding tuple iterators, unmutated collections, and function call optimization. Enhance your Python programming skills with practical tips and techniques for writing faster, more efficient code.
Syllabus
Intro
James Murphy talk
How to improve performance
Before you start
Profilers
Sampling profilers
My favourite profilers
Antipatterns
linter
Looping variants
List comprehension
Wrong types
Example
Reading the results
tuple iterator
unmutated collection
calling too many functions
a and b example
Utility library
Wrap up
Outro
Taught by
PyCon US