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

<- View Parent
PattyMcB@lemmy.world ⁨2⁩ ⁨days⁩ ago

I appreciate the large amount of info. Great answer. It just doesn’t make sense to me, all things being equal (including performant algorithms), why choose Python and then make a small performance tweak like in the article? I understand preferring the faster implementation, but it seems to me like waxing your car to reduce wind resistance to make it go faster, when installing a turbo-charger would be much more effective.

source
Sort:hotnewtop