Skip to content
All lessons

Tech Insights· open.substack.com

Python Performance: Why 'if not list' is 2x Faster Than Using len()

From open.substack.com

Discover why 'if not mylist' is twice as fast as 'len(mylist) == 0' by examining CPython's VM instructions and object memory access patterns.

Shared by

Read on open.substack.com

Book a call

Lessons like this one
shape how we build.

Tell us what you’re building. In one call, we’ll show you how our team would approach it.

Tell us what you’re building, and we’ll show you how we’d approach it.

Still prefer the good old email? Contact us