Comment on Ask HN: What's the most elegant piece of code you've seen?parentComments−hayd10yThe scope lifting (I forget what this performance hack is called), `_len = len` etc., is unsatisfying.−elliptic10yI noticed that, but haven't any idea what the purpose is?−pmiller210yIt's a speed optimization. Local lookups are faster than global lookups in Python.
Comments
The scope lifting (I forget what this performance hack is called), `_len = len` etc., is unsatisfying.
I noticed that, but haven't any idea what the purpose is?
It's a speed optimization. Local lookups are faster than global lookups in Python.