[Python-Dev] LOAD_SELF and SELF_ATTR opcodes
Michael Hudson
mwh at python.net
Sat Oct 15 10:17:36 CEST 2005
"Phillip J. Eby" <pje at telecommunity.com> writes:
> Indeed, even pystone doesn't do much attribute access on the first argument
> of most of its functions, especially not those in inner loops. Only
> Proc1() and the Record.copy() method do anything that would be helped by
> SELF_ATTR. But it seems to me that this is very unusual for
> object-oriented code, and that more common uses of Python should be helped
> a lot more by this.
Is it that unusual though? I don't think it's that unreasonable to
suppose that 'typical smalltalk code' sends messages to self a good
deal more often than 'typical python code'. I'm not saying that this
*is* the case, but my intuition is that it might be (not all Python
code is that object oriented, after all).
Cheers,
mwh
--
The source passes lint without any complaint (if invoked with
>/dev/null). -- Daniel Fischer, http://www.ioccc.org/1998/df.hint
More information about the Python-Dev
mailing list