abhi9u@lemmy.world to Technology@lemmy.worldEnglish · 2 months agoPython Performance: Why 'if not list' is 2x Faster Than Using len()blog.codingconfessions.comexternal-linkmessage-square118linkfedilinkarrow-up1196arrow-down121cross-posted to: python@programming.dev
arrow-up1175arrow-down1external-linkPython Performance: Why 'if not list' is 2x Faster Than Using len()blog.codingconfessions.comabhi9u@lemmy.world to Technology@lemmy.worldEnglish · 2 months agomessage-square118linkfedilinkcross-posted to: python@programming.dev
minus-squareuis@lemm.eelinkfedilinkEnglisharrow-up12·2 months agoThere are decades of articles on c++ optimizations, that say “use empty() instead of size()”, which is same as here.
There are decades of articles on c++ optimizations, that say “use empty() instead of size()”, which is same as here.