Erik wrote:
When considering special-casing this opcode sequence, remember that in-place operations can be performed on anonymous objects (i.e., those referenced by a collection and not bound directly to a namespace):
I think this means you would want multiple versions of the +=1 opcode: ADD_ONE_TO_NAME, ADD_ONE_TO_ITEM, ADD_ONE_TO_ATTR, etc. Essentially one for each variant of the STORE operation. Or you might choose to optimise just the local name case, on the basis that the overhead of things like item and attribute lookup would probably swamp any possible gains. -- Greg -- https://mail.python.org/mailman/listinfo/python-list