Tim Delaney wrote:
> that also binds all attribute accesses all the way down into a single
> constant call e.g.
>
>LOAD_FAST 0
>LOAD_ATTR 'a'
>LOAD_ATTR 'b'
>LOAD_ATTR 'c'
>LOAD_ATTR 'd'
>
> is bound to a single constant:
>
>LOAD_CONST 5
D'oh. I'm a moron - of course
At 09:17 AM 10/15/2005 +0100, Michael Hudson wrote:
>"Phillip J. Eby" <[EMAIL PROTECTED]> 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
"Phillip J. Eby" <[EMAIL PROTECTED]> 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
[EMAIL PROTECTED] wrote:
> (Send it to Raymond H. He'll probably sneak it in when Martin's not
> looking. )
I'm not personally objecting :-) I just recall that there was that kind
of objection when I proposed similar changes myself a couple of years
ago.
Regards,
Martin
_
Sorry I can't reply to the message (I'm at home, and don't currently have
python-dev sent there).
I have a version of Raymond's constant binding recipe:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/277940
that also binds all attribute accesses all the way down into a single
constant
>> 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
At 12:33 AM 10/15/2005 +0200, Martin v. Löwis wrote:
>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
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.
As for measuri
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
I ran across an interesting paper about some VM optimizations yesterday:
http://www.object-arts.com/Papers/TheInterpreterIsDead.PDF
One thing mentioned was that saving even one cycle in their 'PUSH_SELF'
opcode improved interpreter performance by 5%. I thought that was pretty
cool, and the
10 matches
Mail list logo