Message79056
@Alexandre:
> > 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.
OK, it's time that I post code to experiment with that - there is no
need to break EXTENDED_ARG. And the point is to fight miscompilations.
> 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.
More or less, I mean that, but I was making an example, and I made up
reasonable figures.
70%, or even more, just for _dispatch_ (i.e. just for the mispredicted
indirect jump), is valid for real-world Smalltalk interpreters for
instance, or for the ones in "The Structure and Performance of Efficient
Interpreters".
But, when you say "intepreting opcodes", I do not know which part you
refer to, if just the computed goto or for the whole code in the
interpreter function. |
|
Date |
User |
Action |
Args |
2009-01-04 13:40:49 | blaisorblade | set | recipients:
+ blaisorblade, lemburg, skip.montanaro, rhettinger, facundobatista, pitrou, christian.heimes, ajaksu2, alexandre.vassalotti, djc, ralph.corderoy, bboissin, theatrus |
2009-01-04 13:40:48 | blaisorblade | set | messageid: <1231076448.48.0.957396810574.issue4753@psf.upfronthosting.co.za> |
2009-01-04 13:40:47 | blaisorblade | link | issue4753 messages |
2009-01-04 13:40:47 | blaisorblade | create | |
|