@[email protected] to [email protected]English • 2 months agoPython Performance: Why 'if not list' is 2x Faster Than Using len()blog.codingconfessions.comexternal-linkmessage-square150fedilinkarrow-up1223cross-posted to: [email protected]
arrow-up1223external-linkPython Performance: Why 'if not list' is 2x Faster Than Using len()blog.codingconfessions.com@[email protected] to [email protected]English • 2 months agomessage-square150fedilinkcross-posted to: [email protected]
minus-square@[email protected]linkfedilinkEnglish2•2 months 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•2 months 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.