~/talk

Intuition vs. Reality: Surprising Truths in Python Performance

Talkat PyCon Italia 2025 · 2025-05-28..05-31· [testing]
slides:none on file

Interactive benchmarks compare concrete snippets and tools: an async sleep left un-awaited returns immediately; counting evens shows len(listcomprehension) wins by ~>10% but allocates a new list so it trades memory for time; string concatenation with ''.join preallocates a buffer and is drastically faster; list comprehensions beat map+lambda due to fewer bytecode hops; small Rust calls lose to Python from conversion overhead while CPU-heavy Rust wins, and lazy conversion fixes binary‑search regression — measured with their CI tool and P99.

AI-written summary · about

  1. 0:00Introduction to talk
  2. 1:13About CodeSpeed tool
  3. 2:57Why performance matters
  4. 4:03Performance intuition limits
  5. 5:08First performance quiz
  6. 6:57Counting even numbers
  7. 9:31Memory vs execution speed
  8. 11:57String concatenation
  9. 14:48List comprehension vs map
  10. 18:29Recursive vs stack factorial
  11. 20:36Python vs Rust basics
  12. 21:58Fibonacci in Rust
  13. 23:48Binary search comparison
  14. 26:23Rust rewriting pitfalls
  15. 26:44Quiz leaderboard reveal
  16. 27:05Talk takeaways
  17. 28:08CodeSpeed tool release
  18. 28:28Q&A session
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.