Author alexandre.vassalotti
Recipients ajaksu2, alexandre.vassalotti, bboissin, blaisorblade, christian.heimes, djc, lemburg, pitrou, rhettinger, skip.montanaro, theatrus
Date 2009-01-04.04:51:12
SpamBayes Score 2.24073e-09
Marked as misclassified No
Message-id <1231044674.89.0.486573368494.issue4753@psf.upfronthosting.co.za>
In-reply-to
Content
Paolo wrote:
> So, can you try dropping the switch altogether, using always computed
> goto and seeing how does the resulting code get compiled?

Removing the switch won't be possible unless we change the semantic
EXTENDED_ARG. In addition, I doubt the improvement, if any, would worth
the increased complexity.

> To be absolutely clear: x86_64 has more registers, so the rest of the
> interpreter is faster than x86, but dispatch still takes the same
> absolute time, which is 70% on x86_64, but only 50% on x86 (those are
> realistic figures);

I don't understand what you mean by "absolute time" here. Do you
actually mean the time spent interpreting bytecodes compared to the time
spent in the other parts of Python? If so, your figures are wrong for
CPython on x86-64. It is about 50% just like on x86 (when running
pybench). With the patch, this drops to 35% on x86-64 and to 45% on x86.

> In my toy interpreter, computing last_i for each dispatch doesn't give
> any big slowdown, but storing it in f->last_i gives a ~20% slowdown.

I patched ceval.c to minimize f->last_i manipulations in the dispatch
code.  On x86, I got an extra 9% speed up on pybench. However, the patch
is a bit clumsy and a few unit tests are failing. I will see if I can
improve it and open a new issue if worthwhile.
History
Date User Action Args
2009-01-04 04:51:15alexandre.vassalottisetrecipients: + alexandre.vassalotti, lemburg, skip.montanaro, rhettinger, pitrou, christian.heimes, ajaksu2, djc, bboissin, blaisorblade, theatrus
2009-01-04 04:51:14alexandre.vassalottisetmessageid: <1231044674.89.0.486573368494.issue4753@psf.upfronthosting.co.za>
2009-01-04 04:51:14alexandre.vassalottilinkissue4753 messages
2009-01-04 04:51:12alexandre.vassalotticreate