@[email protected] to [email protected]English • 18 days agoPython Performance: Why 'if not list' is 2x Faster Than Using len()blog.codingconfessions.comexternal-linkmessage-square150fedilinkarrow-up1222cross-posted to: [email protected]
arrow-up1222external-linkPython Performance: Why 'if not list' is 2x Faster Than Using len()blog.codingconfessions.com@[email protected] to [email protected]English • 18 days agomessage-square150fedilinkcross-posted to: [email protected]
minus-square@[email protected]linkfedilinkEnglish2•17 days agoThat’s exactly what I was getting at. Getting length of an empty list would not even enter the loop.
minus-square@[email protected]linkfedilinkEnglish1•17 days agoYes. If it’s empty. But in cases where you need to check, it might as well not be.
That’s exactly what I was getting at. Getting length of an empty list would not even enter the loop.
Yes. If it’s empty. But in cases where you need to check, it might as well not be.