EuroPython 2025

Broken __slots__ are a silent performance killer—Let's fix them!
2025-07-18 , South Hall 2A

__slots__ are a double-edged sword. While they promise a leaner memory footprint and faster attribute access, they can silently backfire, creating performance pitfalls in your code. Are you sure you're getting the benefits you think you are?

This talk clears up common misconceptions with up-to-date benchmarks, showing you what to really expect from __slots__ on modern Python. We’ll then dissect real-world failure modes—from overlapping definitions to broken inheritance—that can undermine your application's performance. You’ll learn to diagnose these issues and see how to automate their detection in your CI/CD pipeline, ensuring your __slots__ are a help, not a hindrance.


Expected audience expertise:

Advanced

See also:

Originally trained as a civil engineer, I’ve spent the past 11 years immersed in the tech industry, working at both a startup and a large corporate. My expertise lies in Python, though I enjoy exploring languages like Rust. I’m passionate about writing maintainable code, getting to the heart of complex concepts, and sharing what I learn with others.