Talk

Intuition vs. Reality: Surprising Truths in Python Performance

LanguageEnglish
Audience levelIntermediate
Elevator pitch

Join our interactive talk to watch intuition crumble under real-world benchmarks. We’ll quiz your gut feelings, reveal surprising results, and show how measurement tools unlock true speed. Come for the surprises, stay for the insights!

Abstract

How often do we trust our instincts when optimizing code? In Python, performance frequently defies intuition, leading us to make changes that might slow things down instead of speeding them up. This talk explores surprising truths about Python performance and showcases why measurement tools are essential for finding the real bottlenecks in our code.

Consider this: is it faster to count even numbers in a list using len([x for x in arr if x % 2 == 0]) or sum(1 for x in arr if x % 2 == 0)? While one might seem more Pythonic or efficient at first glance, the performance results might surprise you.

Through an interactive format, we’ll quiz you on performance scenarios using real-world examples. From counting even numbers to rewriting Python code in Rust, each case study will challenge assumptions about what makes code faster.

Plan:

  1. Introduction: Why intuition often fails in software performance
  2. Interactive performance case studies: Real-world examples that will surprise you
    • Counting even numbers
    • String concatenation
    • Pathfinding optimization
    • etc.
  3. Conclusion: How do we become consistent about optimizations?

By the end, you’ll understand why performance measurements matter and leave with practical insights and tools to improve Python performance systematically.

TagsBest Practice, Testing, Performance and scalability techniques
Participant

Arthur Pastel

Hi, I’m Arthur, a software engineer based in Paris 🇫🇷🥖

I worked as an engineer in a few tech companies over the past years, mostly building software with Python, but I’m also passionate about (too ??) many other software fields.

I’m an open-source enthusiast and love to contribute when possible. Three years ago, I built ODMantic, an ODM for MongoDB and Python. It’s a kind of ORM built on top of Pydantic to provide a seamless model definition and integration with FastAPI.

2 years ago, I founded CodSpeed, a Continuous Performance Analysis solution helping tech companies and Open-Source projects prevent performance issues directly in their CI pipelines.