The Real Python Podcast

Considering Fast and Slow in Python Programming

23 snips
Jan 16, 2026
In this discussion, Christopher Trudeau, a Python developer and curator for PyCoder's Weekly, shares insights on the concept of speed in programming. He highlights the inefficiencies that developers face when obsessing over performance metrics without context. The duo also dives into the impressive speed of the uv library due to thoughtful engineering. Trudeau breaks down why Python's deepcopy can slow you down and discusses essential Python performance numbers. Lastly, they tackle spec-driven development and its relevance in today's programming landscape.
Ask episode
AI Snips
Chapters
Books
Transcript
Episode notes
INSIGHT

Why UV Is So Fast

  • UV's speed arises from modern standards and deliberate design choices, not just being written in Rust.
  • Removing legacy formats, parallel downloads, and global caching produced order-of-magnitude improvements.
ADVICE

Avoid Unnecessary Deep Copies

  • Avoid deep copying large nested objects unless necessary; prefer shallow copies or recreate only what you need.
  • Use serialize/deserialize or library-specific fast copies (e.g., NumPy) when appropriate to reduce cost.
ANECDOTE

Deepcopy Bit My Library

  • Christopher Trudeau fixed his slow library by replacing blanket deepcopy calls with targeted shallow copies.
  • That change reduced startup from about a minute to a few seconds in his case.
Get the Snipd Podcast app to discover more snips from this episode
Get the app