[Python-Dev] LOAD_SELF and SELF_ATTR opcodes
skip@pobox.com
skip at pobox.com
Sat Oct 15 02:22:53 CEST 2005
>> Phillip J. Eby wrote:
>> > Anyway, my main question is, do these sound like worthwhile
>> > optimizations?
>>
>> In the past, I think the analysis was always "no". It adds an opcode,
>> so increases the size of the switch, causing more pressure on the
>> cache, with an overall questionable effect.
Phillip> Hm. I'd have thought 5% pystone and 2% pybench is nothing to
Phillip> sneeze at, for such a minor change.
We've added lots of new opcodes over the years. CPU caches have grown
steadily in that time as well, from maybe 128KB-256KB in the early 90's to
around 1MB today. I suspect cache size has kept up with the growth of
Python's VM inner loop. At any rate, each change has to be judged on its
own merits. If it speeds things up and is uncontroversial
implementation-wise, I see no reason it should be rejected out-of-hand.
(Send it to Raymond H. He'll probably sneak it in when Martin's not
looking. <wink>)
Skip
More information about the Python-Dev
mailing list