[Python-Dev] LOAD_SELF and SELF_ATTR opcodes

skip@pobox.com skip at pobox.com
Sat Oct 15 00:20:52 CEST 2005


    Phillip> Indeed, even pystone doesn't do much attribute access on the
    Phillip> first argument of most of its functions, especially not those
    Phillip> in inner loops.  Only Proc1() and the Record.copy() method do
    Phillip> anything that would be helped by SELF_ATTR.  But it seems to me
    Phillip> that this is very unusual for object-oriented code, and that
    Phillip> more common uses of Python should be helped a lot more by this.
    Phillip> Do we have any benchmarks that don't use 'foo = self.foo' type
    Phillip> shortcuts in their inner loops?

(Just thinking out loud...)

Maybe we should create an alternate "object-oriented" version of pystone as
a way to inject more attribute access into a convenient benchmark.  Even if
it's completely artificial and has no connection to other versions of the
Drhystone benchmark, it might be useful for testing improvements to
attribute access.

Skip


More information about the Python-Dev mailing list