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

<- View Parent
antlion@lemmy.dbzer0.com ⁨2⁩ ⁨days⁩ ago

But the first example does the same thing for an empty list. I guess the lesson is that if you’re measuring the speed of arbitrary stylistic syntax choices, maybe Python isn’t the best language for you.

source
Sort:hotnewtop