[Python-Dev] Re: opcode performance measurements

Skip Montanaro skip@pobox.com
Fri, 1 Feb 2002 08:51:25 -0600


It just occurred to me that my LOAD_GLOBAL/LOAD_ATTR eliding scheme can't
work, since LOAD_ATTR calls PyObject_GetAttr, which can wind up calling
__getattr__, which is free to inflict all sorts of side effects on the
attribute lookup.  PEP 267 doesn't appear to be similarly affected, assuming
it can conclude that LOAD_GLOBAL is actually loading a module object.  (Can
it?)  LOAD_GLOBAL alone shouldn't be a problem, since all that does is call
PyDict_GetItem for globals and builtins.

damn...

Skip