
#330 Your data, validated 5x-50x faster, coming soon
Python Bytes
00:00
The Advantages and Drawbacks of for Loops
There's a byte code called list underscore append. If you do this with a for loop where you have a list and you call a pen, it loads the function append and then calls append on the operands. It's not in the runtime in a for loop in a comprehension, there's a special byte code that runs. The benefit is list append is a byte code operation, not a function call. But the drawback is there's this object created,. There's a stack frame created,there's a function call over to this comprehension call. That could potentially affect somebody if they return locals as an item during a list comprehension or something like that. So I just want people to kind of
Transcript
Play full episode