[pypy-dev] Bytecode counting patch
Ben.Young at risk.sungard.com
Ben.Young at risk.sungard.com
Tue Aug 8 08:57:55 CEST 2006
pypy-dev-bounces at codespeak.net wrote on 07/08/2006 17:35:17:
> Hi Ben,
>
> It's nice to know what opcodes are popular! However, sorting them in
> whatever order within a switch will likely not make a difference.
> This switch will be converted to a jumptable, so the compiler will
> order the cases again.
>
> cheers
> Eric
>
Hi Eric,
It probably won't, but there appeared to be some desire for this on irc,
and this is the kind of project I can fit into my lunch break! I think
it's worth a try to see if it makes a difference. Unfortunately, I can't
test it here.
Cheers,
Ben
>
> On Aug 7, 2006, at 4:35 PM, Ben.Young at risk.sungard.com wrote:
>
> > Hi PyPys!
> >
> > Here's a patch that counts the number of times the different
> > bytecodes are
> > used. I haven't tried doing translation yet as I can't use the work
> > machine cycles, but it can't be far off. I've put the counts on the
> > object
> > space as this is accessable from most places.
> >
> > I've also implemented something that should resort the opcodes in the
> > switch statement of the bytecode dispatcher according to the
> > statistics I
> > found. This may have a slight speed improvement.
> >
> >
> >
> > Cheers,
> > Ben
> > <diff.txt>
> > _______________________________________________
> > pypy-dev at codespeak.net
> > http://codespeak.net/mailman/listinfo/pypy-dev
>
> _______________________________________________
> pypy-dev at codespeak.net
> http://codespeak.net/mailman/listinfo/pypy-dev
>
More information about the Pypy-dev
mailing list