Poor Yorick <org.python.pythonl...@pooryorick.com> wrote:
> In the following snippet, the loop in the global namespace takes twice > as long as the loop in the function namespace. Why? > Accessing global variables is generally slower than accessing local variables. Locals are effectively stored in a vector so the bytecode can go straight to the first local or the second local. Globals require a dictionary lookup. -- http://mail.python.org/mailman/listinfo/python-list